You are on page 1of 21

Chapter 2.

Matrices and Matrix Operations

Matrices
Def 2.1: Two m by n matrices A = (aij) and B = (bij) are said to be equal if corresponding entries in the two matrices are equal, that is aij = bij for all i = 1,,m and for all j = 1,,n.
A 4 2 3 1 B 4 3 2 1 C 4 2 0 3 1 0

Def 2.2: The sum of any two m by n matrices A = (aij) and B = (bij) is the m by n matrix

A + B given by A + B = (aij + bij).


4 2 3 1 B 3 5 8 1 C 4 2 0 3 1 0

A B

4 ( 3) 2 8 3 5 1 ( 1)

1 10 8 0

A + C and B + C are not defined.

Def 2.3: If A = (aij) is an m by n matrix and c is any scalar (or constant), then the scalar product cA is the

m by n matrix given by cA = (caij).


A 4 2 3 1 B 3 5 8 1 C 4 2 0 3 1 0

1 C 2
3(4) 3(3) 3(2) 3(1)

2 3 2

1 1 2

0 0
24 11 18 7

3 A 4B

4( 3) 4(8) 4(5) 4( 1)

Def 2.4: If A = (aij) is an m by n matrix and B = (bij) is an n by p matrix, then the matrix product AB is

the m by p matrix given by AB = (cij), where


n

cij
k 1

aik bkj

ai1b1 j

ai 2b2 j ... ainbnj

4 2 3 1

3 5

8 1

4 2 0 3 1 0

Exer 2.5: Given the following matrices:

1 3 0 1
1 D 3

B
5 2

2 4 2 3
6 E 4

C
1 3 1 3

1 1

2 2

1 0 1 2 4

1 1 2

Find: a) AC

b) BC

c) DE

d) ED

Remark 2.6: a) If A, B and C are matrices such that AC = BC,

it is not always true that A = B.


b) Given two n by n matrices A and B, it is not always true that AB = BA.

Question:
a) If A, B and C are matrices such that

A + C = B + C, is it always true that A = B?


b) Given two n by n matrices A and B, is it always true that A + B = B + A?

Special Matrices
Def 2.7: A square matrix A = (aij) is called an upper

triangular matrix if aij = 0, for all i > j, that is all


entries below the main diagonal are 0.
a11 a12 a13 0 a22 a23 0 0 a33 0 0 0 a1n a2 n a3n ann

aij

A square matrix A = (aij) is called a lower triangular matrix if aij = 0, for all i < j.

Special Matrices
A square matrix A = (aij) is called a diagonal

matrix if aij = 0, for all i

j, that is the nonzero entries,

if any, of the matrix all lie on the main diagonal. An n by n diagonal matrix A = (aij) is called a

scalar matrix if all diagonal entries are equal, that is


ann = c, for some constant c. Further, if the diagonal entries of a scalar matrix are all equal to 1, then the matrix is called the identity matrix In.

3 A 0 0 0

0 8 0 0

0 0 0

0 0 B 0

12 0 0 0

0 12 0 0

0 0 12 0

0 0 0 12

15 0

1 0 0 0 I4 0 1 0 0 0 0 1 0 0 0 0 1
the 4 x 4 identity matrix

0 0 0 0 Z 0 0 0 0 0 0 0 0 0 0 0 0
the 4 x 4 zero matrix

Exer 2.8: Given the following matrices:


A 2 0
3 D 0 0 0 0

0 3
0

5 0 0 4
7 0 0 0

5 0 1

0 0

0 12

Find: a) AB,

b) BA

c) DE,

d) ED

Question: If P and Q are n by n diagonal matrices, is it always true that PQ = QP?

Theorem 2.9: (Properties of Matrix Addition & Scalar Multiplication)

If A, B, C are m n matrices, Z is the m n zero matrix


and c, d are scalars, then 1) A + B = B + A 2) A + (B +C) = (A + B) + C 3) A + Z = Z + A = A 6) c(A + B) = cA + cB 7) (c + d)A = cA + dA 8) (cd)A = c(dA)

4) A + ( A) = ( A) + A = Z

9) 1A = A

5) If cA = Z, then c = 0 or A = Z.

Theorem 2.10: (Properties of Matrix Multiplication) If A, B and C are matrices (with sizes such that the given matrix products are defined) and c is a scalar, then 1) A(BC) = (AB)C

2) A(B + C) = AB + AC
3) (A + B)C = AC + BC

4) c(AB) = (cA)B = A(cB)

Theorem 2.11: (Properties of the Identity Matrix) If A is a matrix of size m by n, then

1. AI n 2. I m A

A A

If A is a square matrix of order n, then

AI n

In A

Notation 2.12: For repeated multiplication of square matrices, we use the notation Ak to denote the product

AA A
k factors

for any positive integer k. We also define A0 to be the identity matrix.

Exa 2.13: Solve for the unknown matrix X in the matrix equation 4X + A = B, where

1 2 0 3

4 2 3 1
A or

Start with 4X + A = B to get 4X = B

1 B A 4

1 4

4 2 3 1

1 2 0 3

1 4

5 3

0 2

5 4 3 4

0 1 2

Def 2.14: If A = (aij) is a matrix of size m by n, the transpose of A, denoted by AT, is a matrix of size n by m given by AT = (aji) for i = 1,,m, j = 1,,n.
1 0 5 3 8 4 2 6 12 13 7 2 9 11 3

1 Q 0

3 8

2 6

13 7 2

9 11 3

QT

5 4 12

Theorem 2.15: If A and B are matrices (with sizes such that the given matrix operations are defined) and

c is a scalar, then

1. A

T T

A
T

1 2 0 3
4 2 3 1

2. A B 3. cA T 4. AB
T

AT
cAT

BT
B

BT AT

Exa 2.16: Find the matrix Q = PPT given


3 P 2 7 4 0 8 PT 1 3 4 8 89 34 29 Q PPT 34 65 20 29 20 50 2 6 7 1

5 6

5 0

What is QT?

Definition 2.17: If A = (aij) is a square matrix such that AT = A (that is, aij = aji for all i, and all j) then we say A is a symmetric matrix. If AT = A , we say A is skew-symmetric.

Which of the following is symmetric? Skew-symmetric? Neither symmetric nor skew-symmetric?


3 A 2 8 2 1 8 B 0 3 2 8 2 5 1 8 1 0 C 0 2 8 2 0 1 8 1 0

5 1

Exercise 2.18:
1. Prove that if A is an m by n matrix, then AAT and

ATA are symmetric matrices.


2. If A is a square matrix, prove that

a) A + AT is symmetric, while
b) A

AT is skew-symmetric.

3. Prove that every square matrix A can be written as

the sum of a symmetric matrix B and a skewsymmetric matrix C.

You might also like