Professional Documents
Culture Documents
Multiplying Matrices and Vectors - Math Insight
Multiplying Matrices and Vectors - Math Insight
⎣ ⎦⎣ ⎦ ⎣ ⎦
am1 am2 … amn xn am1 x1 + am2 x2 + ⋯ + amn xn
For example, if
1 −1 2
A = [ ]
0 −3 1
2
⎡ ⎤
1 −1 2
Ax = [ ]⎢1⎥
0 −3 1
⎣ ⎦
0
2⋅1−1⋅1+0⋅2
= [ ]
2⋅0−1⋅3+0⋅1
1
= [ ].
−3
Matrix-matrix product
⎢ b 21 b 22 … b 2p ⎥ ⎢⎢ b 21 ⎥ ⎢ b 22 ⎥ ⎢ b 2p ⎥⎥
⎢ ⎥ ⎢ ⎢ ⎥⎥
⎢ ⎥⎢ ⎥⋯
⎢ ⎥= ⎢ ⎢ ⎥⎥
⎢ ⎥⎢ ⎥
⎢ ⎥ ⎢ ⎢ ⎥⎥
⎢ ⋮ ⋮ ⋮ ⋮ ⎥ ⎢⎢ ⋮ ⎥⎢ ⋮ ⎥ ⎢ ⋮ ⎥⎥
⎣ ⎦ ⎣⎣ ⎦⎣ ⎦ ⎣ ⎦⎦
b n1 b n2 … b np b n1 b n2 b np
0 4 −2
A = [ ]
−4 −3 0
0 1
⎡ ⎤
B = ⎢1 −1 ⎥ .
⎣ ⎦
2 3
Then,
0 1
⎡ ⎤
0 4 −2
AB = [ ]⎢1 −1 ⎥
−4 −3 0
⎣ ⎦
2 3
0⋅0+4⋅1−2⋅2 0 ⋅ 1 + 4 ⋅ (−1) − 2 ⋅ 3
= [ ]
−4 ⋅ 0 − 3 ⋅ 1 + 0 ⋅ 2 −4 ⋅ 1 − 3 ⋅ (−1) + 0 ⋅ 3
0+4−4 0−4−6
= [ ]
0−3+0 −4 + 3 + 0
0 −10
= [ ].
−3 −1
See also
Vectors in arbitrary dimensions
Introduction to matrices
Matrix and vector multiplication examples
Matrices and determinants for multivariable calculus
Dot product in matrix notation
Cite this as
Nykamp DQ, “Multiplying matrices and vectors.” From Math Insight. http://mathinsight.org
/matrix_vector_multiplication
Keywords:
matrices, vectors
Multiplying matrices and vectors by Duane Q. Nykamp is licensed under a Creative Commons Attribution-
Noncommercial-ShareAlike 4.0 License. For permissions beyond the scope of this license, please contact us.