Matrix and vector multiplication examples
Example 1
Compute Ax where x = (-2,-1, 0)
A = . |
Solution:
| Ax | = ![]() ![]() | ||
= ![]() | |||
= = (0,-3,-6,-6). |
Example 2
Compute Ay where y = (-3,-2,-1, 0) and A is as in Example 1.
Solution: The matrix-vector product is not defined. A is 4 × 3 and y is 4 × 1 (viewed as column vector).
Example 3
Compute BC, where
B = and C = . |
Solution:
| BC | = ![]() ![]() | ||
= ![]() | |||
= ![]() |
Example 4
Using B and C as defined in Example 3, calculate CB.
Solution:
| CB | = ![]() ![]() | ||
= ![]() | |||
= ![]() |
B = and C = . |




= (0
and 
![[ ]
1 2 3
4 5 6](matvecmultex7x.png)

![[ ]
1 ⋅ 1 + 2 ⋅ 3 + 3 ⋅ 5 1 ⋅ 2 + 2 ⋅ 4 + 3 ⋅ 6
4 ⋅ 1 + 5 ⋅ 3 + 6 ⋅ 5 4 ⋅ 2 + 5 ⋅ 4 + 6 ⋅ 6](matvecmultex9x.png)
![[ ]
22 28
49 64](matvecmultex10x.png)

![[ ]
1 2 3
4 5 6](matvecmultex12x.png)


and ![[ ]
5 6
7 8](matvecmultex16x.png)