Hacker News new | ask | show | jobs
by burnished 1812 days ago
Can you link to context for this? I learned both in linear algebra, so it seems like either would be just as 'expected'.
1 comments

Here's a concrete example. The first matrix in the post is f = [[1, 1, 1], [1, 1, 1], [1, 1, 1]].

In linear algebra, we would interpret this as a linear map. A true equation would be f([1, 2, 3]^T) = [6, 6, 6]^T (where I'm using ^T to mean "transpose to a column vector").

But here, the author means f(1, 2) = 1, i.e. the (1,2) coordinate of the matrix is 1.

Thank you! Yes, I agree, thank you for explaining that to me.
And interestingly, both are connected. If d_i somewhat hand-wavingly expresses the vector d_i = (0, ..., 0, 1, 0, ... 0) with the 1 at position i, then given matrix M you can do

f(i, j) := d_i^T * M * d_j

The RHS is using classical matrix multiplication, and the function value will be the matrix' entry at column i, row j.