You are on page 1of 15

Formal Definitions of

Matrices and Vectors

• What is a matrix?
A rectangular array of numbers – m rows by n columns

Row 1 a11 a12 a13


“2 × 3 matrix”
Row 2 a21 a22 a23

Columns 1 2 3
9
Formal Definitions of
Matrices and Vectors

• What is a vector?
A one-dimensional array – a single column (or row)

a11
or a11 a12 a13
a21

“column vector” “row vector”

10
Formal Definitions of
Matrices and Vectors

• What is a scalar?
A real number – a 1 by 1 array

a11 or more simply a

11
Matrix Sum: A + B

a11 a12 a13 b11 b12 b13


+ =
a21 a22 a23 b21 b22 b23

a11 + b11 a12 + b12 a13 + b13


a21 + b21 a22 + b22 a23 + b23

The number of rows and columns of A and B must be the same.


Addition is commutative.
12
Scalar Matrix Product: a B

b11 b12 b13 ab11 ab12 ab13


a⋅ =
b21 b22 b23 ab21 ab22 ab23

b11 b12 b13


= ⋅a
b21 b22 b23

The resulting matrix has the same number of rows and columns
as B. Scalar multiplication is commutative.
13
Matrix Vector Product: A B

a11 a12 a13 b11 a11 b11 + a12 b21 + a13 b31
=
a21 a22 a23 b21 a21 b11 + a22 b21 + a23 b31
b31

• “Dot product” each row of A by column vector B.


• A must have same number of columns as B has rows.
• The result is a column vector having the same number
of rows as A.
• This operation is not commutative.
14
Matrix Vector Product: A B

a11 a12 a13 b11 a11 b11 + a12 b21 + a13 b31
=
a21 a22 a23 b21 a21 b11 + a22 b21 + a23 b31
b31

15
Matrix Matrix Product: A B

a11 a12 a13 b11 b12


=
a21 a22 a23 b21 b22
b31 b32

a11 b11 + a12 b21 + a13 b31 a11 b12 + a12 b22 + a13 b32
a21 b11 + a22 b21 + a23 b31 a21 b12 + a22 b22 + a23 b32

• “Dot product” each row of A by a column vector of B.


• A must have same number of columns as B has rows.
• The resulting matrix has the same number of rows as A and columns as B.
• This operation is not commutative. 16
Matrix Matrix Product: A B

a11 a12 a13 b11 b12


=
a21 a22 a23 b21 b22
b31 b32

a11 b11 + a12 b21 + a13 b31 a11 b12 + a12 b22 + a13 b32
a21 b11 + a22 b21 + a23 b31 a21 b12 + a22 b22 + a23 b32

17
Matrix Matrix Product: A B

a11 a12 a13 b11 b12


=
a21 a22 a23 b21 b22
b31 b32

a11 b11 + a12 b21 + a13 b31 a11 b12 + a12 b22 + a13 b32
a21 b11 + a22 b21 + a23 b31 a21 b12 + a22 b22 + a23 b32

18
Matrix Matrix Product: A B

a11 a12 a13 b11 b12


=
a21 a22 a23 b21 b22
b31 b32

a11 b11 + a12 b21 + a13 b31 a11 b12 + a12 b22 + a13 b32
a21 b11 + a22 b21 + a23 b31 a21 b12 + a22 b22 + a23 b32

19
Alternate View of Matrix Vector Product A B

a11 a12 a13 b11 a11 a12 a13


= b11 + b21 + b31
a21 a22 a23 b21 a21 a22 a23
b31
a11 b11 + a12 b21 + a13 b31
=
a21 b11 + a22 b21 + a23 b31

This result is the sum of each column of A scalar-multiplied


by the corresponding row-element of B.
20
The Identity Operation: IB = B

1 0 0 b11 b11
0 1 0 b21 = b21
0 0 1 b31 b31

3 × 3 identity matrix, I

The identity matrix I is an n × n matrix containing 1’s along


the diagonal and 0’s elsewhere.
21
T
Matrix Transpose: A

T
a11 a12 a13 a11 a21
=
a21 a22 a23 a12 a22
a13 a23

This operation interchanges the rows and columns of a matrix.

22
–1
Matrix Inverse: A
An n × n matrix A is said to have the inverse
A–1 if the following two commutative matrix
product relations are satisfied:

A A–1 = I and A–1A = I

where I is the identity matrix.

CAUTION: The elements of A–1 do NOT equal the reciprocal


of the corresponding elements of A.
23

You might also like