How to multiply matrix with row vector?

In summary, when calculating a 3x3 matrix multiplication with a 3 column row vector, you can only multiply matrix times column or row times matrix. The "inner dimensions" must match and the outer dimensions determine the dimension of the resulting matrix. Tricks such as assuming the row vector is the first row of a 3x3 matrix or using independent column vectors may cause confusion and it is important to understand the rule of "row times column." This rule results in a number when using a row vector and a column vector, and a rank-1 matrix when using a column vector and a row vector.
  • #1
entropy1
1,230
71
How do I calculate a 3x3 matrix multiplication with a 3 column row vector, like below?

##
\begin{bmatrix}
A11 & A12 & A13\\
A21 & A22 & A23\\
A31 & A32 & A33
\end{bmatrix}\begin{bmatrix}
B1 & B2 & B3
\end{bmatrix}
##
 
Last edited:
Physics news on Phys.org
  • #2
You can only multiply matrix times column or row times matrix.
$$
\begin{pmatrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\end{pmatrix}\cdot
\begin{pmatrix}b_{1}\\b_{2}\\b_{3}\end{pmatrix}=
\begin{pmatrix}a_{11}b_{1}+a_{12}b_{2}+a_{13}b_{3}\\a_{21}b_{1}+a_{22}b_{2}+a_{23}b_{3}\\a_{31}b_{1}+a_{32}b_{2}+a_{33}b_{3}\end{pmatrix}
$$
 
  • Like
Likes scottdave and jim mcnamara
  • #3
The "inner dimensions" must match. A column vector is a 3x1 [3 rows by 1 column] while a row vector is a 1x3 matrix.

Use the outer dimensions to get dimension of the resulting matrix.

So you can multiply a (1x3) by a (3x3) and get a 1x3.

Multiply a 1x3 by a 3x1 and get a 1x1... essentially the same as dot product of two vectors
 
  • Like
Likes DeBangis21 and FactChecker
  • #4
I guess you can use various tricks, like assuming your row vector is the first row of a 3X3 matrix with zeros in the other places, or that the matrix on the left is made up of three “independent” column vectors, etc. However, you have to ask yourself what mathematical or physical objects do I get from such tricks?
 
Last edited:
  • #5
apostolosdt said:
However, you have to ask yourself what mathematical or physical objects do I get from such tricks?
That's the point! It is important to understand the rule: 'row times column'. This has a meaning in itself, so "tricks" may cause more confusion than they solve. E.g.
$$
\begin{pmatrix}a&b&c\end{pmatrix}\cdot \begin{pmatrix}x\\y\\z\end{pmatrix} =\bigl \langle \begin{pmatrix}a&b&c\end{pmatrix}\, , \,\begin{pmatrix}x&y&z\end{pmatrix} \bigr\rangle = ax+by+cz \in \mathbb{R}
$$
is a number, e.g. a real number if the vectors have real components, whereas
$$
\begin{pmatrix}a\\b\\c\end{pmatrix}\cdot \begin{pmatrix}x&y&z\end{pmatrix}=\begin{pmatrix}a\\b\\c\end{pmatrix}\otimes \begin{pmatrix}x&y&z\end{pmatrix}=\begin{pmatrix}ax&ay&az\\bx&by&bz\\cx&cy&cz\end{pmatrix} \in \operatorname{M}(2,\mathbb{R})
$$
is a rank-##1## matrix, i.e. e.g. a ##(1,1)##-tensor.
 

1. What is the requirement for multiplying a matrix by a row vector?

The primary requirement for multiplying a matrix by a row vector is that the number of columns in the matrix must equal the number of elements in the row vector. This is necessary to perform the dot product of the rows of the matrix with the row vector.

2. How do you multiply a matrix by a row vector?

To multiply a matrix by a row vector, you place the row vector on the left side of the matrix. Then, multiply each element of the row vector with the corresponding element in each column of the matrix and sum up the results. This results in a new row vector where each element is the dot product of the original row vector and a column of the matrix.

3. What is the result of multiplying a matrix by a row vector?

The result of multiplying a matrix by a row vector is a single row vector. The number of elements in this resulting row vector is equal to the number of columns in the original matrix. Each element of the resulting vector is computed as the dot product of the row vector with each column of the matrix.

4. Can you give an example of multiplying a matrix by a row vector?

Consider a row vector [a b] and a matrix: [[x y], [z w]]To multiply the row vector by the matrix, calculate as follows:[a*x + b*z, a*y + b*w]This results in a new row vector formed by these computations.

5. What happens if the matrix and row vector dimensions do not align?

If the number of elements in the row vector does not match the number of columns in the matrix, the multiplication cannot be performed. The operation is undefined because there is no way to pair each element of the row vector with a corresponding column in the matrix for the dot product operation.

Similar threads

  • Linear and Abstract Algebra
Replies
10
Views
142
  • Linear and Abstract Algebra
Replies
6
Views
884
  • Linear and Abstract Algebra
Replies
1
Views
760
Replies
27
Views
1K
  • Linear and Abstract Algebra
Replies
2
Views
1K
  • Linear and Abstract Algebra
Replies
7
Views
2K
  • Linear and Abstract Algebra
Replies
6
Views
524
  • Linear and Abstract Algebra
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
2
Replies
37
Views
4K
  • Linear and Abstract Algebra
Replies
2
Views
2K
Back
Top