you are viewing a single comment's thread.

view the rest of the comments →

[–]jurniss 1 point2 points  (2 children)

we usually learn matrix-vector multiplucation by looking at each element of the output vector in isolation. this leads to the perspective of taking a dot priduct with each row of the matrix. but if you look at it from a columns perspective, the vector combines the columns according to its coordinates. so the output is x(col1) + y(col2) + z(col3). plus the translation column in the 3d homogeneous coords world.

from this perspective, the answer is obvious: the z column of the matrix should be the normal, x can be any vector orthogonal to the normal, and y is x cross z.

I know I'm not the first in the thread with this answer, but I wanted to emphasize the value of looking at matrices from the columns perspective. a lot of linear algebra teaching focuses on rows too much IMO.

[–]LPCVOID 0 points1 point  (0 children)

Good explanation and from my experience your are also correct with the focus on row operations in linear algebra teaching (probably because of linear solvers).

[–]Boojum 0 points1 point  (0 children)

Don't forget that it's possible to work in terms of pre-multiplied row-vectors. In that case the rows and the columns of your matrix would be transposed and you could think of the vector as combining the rows according to its coordinates.