Sunteți pe pagina 1din 3

1.

3 Dot Product & Matrix Multiplication


The Dot Product for Vectors in Rn
Let

a = [a1 a2 ... an]

be a vector in Rn (considered as a 1 by n matrix) and let


then the dot product of a and b is defined by

a . b = a1b1 + a2b2 + ... + anbn = aibi


Example
Find the dot product of

a = [2 1 0 6 -1] and b =
Solution
We have
a . b = (2)(5) + (1)(2) + (0)(-3) + (6)(0) + (-1)(1) = 11

Matrix Multiplication
There are many ways of thinking about a matrix. One way is as a collection of row vectors and
another way is as a collection of column vectors. Consider the m by p matrix A (considered as a
matrix of row vectors) and the p by n matrix B (considered as a matrix of column vectors). The
matrices are shown below.

We define the matrix product by

(AB)ij = vi wj
Remark: If the number of columns of A is not equal to the number of rows of B, then the
product AB is not defined.
Remark: It is not true in general that AB and BA are the same matrix even if they are both
defined.
We can also define

Example
Let

Then the matrix product is

S-ar putea să vă placă și