Linear Algebra - Multiplying a matrix and vector.

Click For Summary
The discussion centers on the correct method for multiplying matrices and vectors, specifically addressing a mistake in the OpenGL SuperBible 5th Edition regarding the placement of a vector in matrix multiplication. It is confirmed that a vector should be positioned on the right side of the matrix, and the initial example provided in the book misrepresents this concept. The conversation highlights that while a matrix can be premultiplied by a row vector, there is no formal method for directly premultiplying a matrix by a column vector. Participants emphasize the importance of adhering to the row-column multiplication rule, although they acknowledge the existence of more generalized multiplication methods. This clarification is crucial for understanding matrix operations in linear algebra.
jinksys
Messages
122
Reaction score
0
I am reading OpenGL SuperBible 5th Edition and noticed something off.
2jMWHl.jpg


I just took linear algebra and was always told to make sure that the rows and columns match when multiplying two matrices. The vector should be on the right side of the matrix, correct?
 
Physics news on Phys.org
Since the matrix is diagonal, it doesn't matter.
 
mathman said:
Since the matrix is diagonal, it doesn't matter.


How so?
 
you are correct. that's a mistake - it should be on the right.
 
Maybe that book defines matrix multiplication in a different way. But your example doesn't show this that much. Do you have a less simple example?
 
jinksys said:
I am reading OpenGL SuperBible 5th Edition and noticed something off.
2jMWHl.jpg


I just took linear algebra and was always told to make sure that the rows and columns match when multiplying two matrices. The vector should be on the right side of the matrix, correct?

You are correct. The diagram is incorrectly denoting the result of the square matrix premultiplying the column vector.
A matrix can be premultiplied by a row vector to yield another matrix, but there is no formal method of premultiplying a matrix directly by a column vector.
 
I believe mathman was referring to
\begin{bmatrix}a & b & c & d \end{bmatrix}\begin{bmatrix}t & 0 & 0 & 0 \\ 0 & u & 0 & 0 \\ 0 & 0 & v & 0 \\ 0 & 0 & 0 & w\end{bmatrix}
and
\begin{bmatrix}t & 0 & 0 & 0 \\ 0 & u & 0 & 0 \\ 0 & 0 & v & 0 \\ 0 & 0 & 0 & w\end{bmatrix}\begin{bmatrix}a \\ b\\ c \\ d\end{bmatrix}

Of course, that is not what is shown in the first post.
 
Hi, jinksys!

Nice of you to spot that error.

You should learn first the row*column-multiplication-type, although it is perfectly possible to define more general multiplication rules.
(And, this is done, for example by the highly general index-multiplication method)
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
744
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 69 ·
3
Replies
69
Views
9K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K