Unit: Matrices

Lesson Preview

We can multiply a square matrix by a column vector, so long as the number of columns in the matrix matches the dimension of the column vector.

For example, we can multiply a 2×22 \times 2 matrix by a 22-dimensional column vector (or 2×12 \times 1 matrix):

[1321][12]=[].\begin{bmatrix} 1 & 3 \\ 2 & -1 \end{bmatrix} \begin{bmatrix} 1 \\ 2 \end{bmatrix} = \begin{bmatrix} * \\ * \end{bmatrix}.

Note that the output vector will also be 22-dimensional.

The way we compute the entries is by taking the dot product of the rows of the matrix with the column vector, i.e.,

[1 3 2 1][12]=[ 1(1)+ 3(2) 2(1)+(1)(2)]\begin{bmatrix} \textcolor{red}{1} &  \textcolor{red}{3} \\  \textcolor{red}{2} &  \textcolor{red}{-1}\end{bmatrix} \begin{bmatrix} 1 \\ 2 \end{bmatrix} = \begin{bmatrix}  \textcolor{red}{1}(1) +  \textcolor{red}{3}(2) \\  \textcolor{red}{2}(1) + ( \textcolor{red}{-1})(2) \end{bmatrix} =[70].= \begin{bmatrix} 7 \\ 0 \end{bmatrix}.

So the first entry in the resultant (output) vector is the dot product of the first row of the 2×22 \times 2 matrix with the (input) column vector.

And the second entry in the resultant (output) vector is the dot product of the second row of the 2×22 \times 2 matrix with the input column vector.

Similarly, we can multiply an n×nn \times n matrix AA with an nn-dimensional column vector v\vec{v} (or n×1n \times 1 matrix), and the output will be another nn-dimensional vector.

A\vec{v} =  \begin{bmatrix}  \textcolor{red}{a_{11}} & \textcolor{red}{a_{12}} & \textcolor{red}{\dots} & \textcolor{red}{a_{1n}}\\  \textcolor{blue}{a_{21}} & \textcolor{blue}{a_{22}} &\textcolor{blue}{\dots} & \textcolor{blue}{a_{2n}} \\  \vdots & \vdots & \ddots & \vdots \\  ...

... continued in the full lesson.

Ready to Start Learning?

Sign up now to access the full Matrix vector multiplication lesson and our entire curriculum!