Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

MATRIX ALGEBRA

Definition

A rectangular array of numbers/elements consisting of m horizontal rows and n vertical


columns,

 a11 a12  a1n 


a a 22  a 2 n 
A   21
     
 
a m1 a m 2  a mn 
is called an m x n matrix and m x n is the size/dimension/order of A. For the entry aij ,
the row subscript is i and the column subscript is j.

The number of entries in an m x n matrix is mn. An m x n matrix can be denoted by the


symbol [ aij ] mn or [ aij ] where i = 1, 2, …, m j = 1, 2, …, n

3 1 6
Example: A 
2 4  1
Matrix A has size 23 with entries
a11 = 3, a12 = 1, a13 = 6
a21 = 2, a22 = 4, a23 = –1

Example: If [ aij ] is 3 x 4 and aij = i + j, find A.


 a11 a12 a13 a14 
A  a 21 a 22 a 23 a 24 
a 31 a 32 a 33 a 34 

1  1 1  2 1  3 1  4  2 3 4 5
 2  1 2  2 2  3 2  4  3 4 5 6
3  1 3  2 3  3 3  4  4 5 6 7

1
TYPES OF MATRICES

Vectors
A matrix that has exactly one row or one column

Matrix 1n row vector


Example: Matrix 14 A=[1 7 12 3]

Matrix m1 column vector


Example:
 1
  2
 
Matrix 51 A   15
 
 9
 16

Square Matrix

A matrix having the same number of columns as rows (m=n).


Example :

1 2 4
2 1
A 22   B33  3 5 2
4 3 4 7 9

Diagonal Matrix
A square matrix A is called a diagonal matrix if all entries that are off the main diagonal
are zero and at least one of the entries on the main diagonal is non-zero.
Example:

1 0 0 1 0 0 0 0 0
0 3 0 , 0 0 0 , 0 0 0
     
0 0 5 0 0 5 0 0 5

2
Identity/Unit Matrix
An identity matrix I is a square matrix for which the entries along the main diagonal all
equal 1 and all other entries equal 0.

Example:
1 0 0 0
1 0 0 
1 0  0 1 0  , I  0 1 0 0
I2    , I   
0 1 
3 4
0 0 1 0
0 0 1  
0 0 0 1

When the product of AI or IA is defined, Amn = Imm Amn = Amn Inn = Amn

Example:
1 0 0
  2 1 6    2 1 6
 1 4 1  0 1 0  
  0 0 1  2 4 1

23 3 3 23

1 0  2 1 6  2 1 6
0 1   2 4 1    2 4 1 
     
2 2 23 23

Transpose of a Matrix

If A is a matrix, the matrix formed from A by interchanging its rows with its columns is
called the transpose of A. The transpose of an mn matrix A, denoted AT, is the n x m
matrix where whose ith row is the ith column of AT.
 Row 1 in A = Colum 1 in AT
Row 2 in A = Column 2 in AT

3
Example:
 10 6
10 6  2
 BT(32)   6 3
8
B( 23)
6 3  2 8 

 3
C( 21)    CT(12)  [3  1]
 1
 (AT)T = A
 (A + B)T = AT + BT
Example:

2 5 1 2
A  B 
7 3 3 1
 3 7 3 10
AB   [A  B]T   
10 4 7 4 

2 7  1 3
AT    BT   
5 3 2 1
3 10
A T  BT     [A  B]T  A T  BT
7 4 
 (kA)T = kAT

Symmetric Matrix
 A square matrix with the same entries above and below the main diagonal.
 A = AT where aij = aji
 2 4 3
 3 2
Example: A  4 1 2 B 
3 2 6 2 5

Zero Matrix
 All matrix entries are zero, denoted by Omn.
0 0 
Example: O22   
0 0 
 A+0=A

4
A–0=A

 A0 = 0
0A = 0

EQUALITY OF MATRICES

 Matrices A and B are equal if and only if they have the same size and 𝐴𝑖𝑗 = 𝐵𝑖𝑗 for
each i and j (that is, corresponding entries are equal)

Example:
 3 2  3 2
A  B 
18 2 18 2
 A = B where aij = bij for all i and j.
Example:
 x y  1 2 7
 2z 5w    4 2
   
By equating corresponding entries, we must have
x=2 y+1=7
2z =4 5w =2
Solving gives
2
x = 2, y = 6, z = 2, w =
5
Example :
2p  3q 4 16 4
 3p  q 8  22 8
   
2p  3q  16  Solving a system of equations 2 X 2

3p  q  22

50 4
p dan q 
7 7

5
MATRIX OPERATIONS
Matrix Addition and Subtraction

Two matrices may be added or subtracted if and only if they have the same size. If the
size of A is different from the size of B, then A±B is not defined.

Properties of Matrix Addition


1. A+B=B+A
2. A + (B + C) = (A + B) + C
3. A+O=O+A=A
Example:
2 3 5  1 2 6
A 23    B23   
 4 1 2 3 2 1 
2  1 3  2 5  6
AB 
4  3 1  2 2  1 
3 5 11

7 3 3 
23
Example:
 1 2 1 0 1 2
A  B 
 2 0 1 1  3 1 
 2 1  1 0 0 0
C O
 0 2 1 0 0 0

a) Show that A + B = B + A
 1 3 3  1 3 3
AB   BA   
  1  3 2   1  3 2
 A+B=B+A
b) Show that A +(B + C) = (A + B) + C

6
 2 2 1   1 4 2
A  (B  C)  A    
 1  5 2   1  5 3 
 1 3 3  1 4 2
(A  B)  C    C  
  1  3 2  1  5 3 
c) Show that A + O = A
 1 2 1 0 0 0  1 2 1
AO     A
 2 0 1 0 0 0  2 0 1
 2 6 6  2  2  6 6  (2)  4 8
 4 1   4 
1    4  4
d)     1  1    8 0
 3 2 0 3  3  0 2  3  3  1

Scalar Multiplication

A scalar is a real number. Scalar multiplication of a matrix is the multiplication of a


matrix by a scalar. The product is found by multiplying each element in the matrix by the
scalar.

Properties of Scalar Multiplication

1. k(A + B) = kA + kB
2. (k1 + k2)A = k1A + k2A
3. k1(k2A) = (k1 k2)A
4. 0A = O
5. AO = O

Example:
3 8 1 
A 
7 1 3
 9 24 3
3A   
21 3 9

7
Example:
1 2 3  4 
A  B
 4  2 7 1

1 1 1 2   3  4
A  3B   3
2 2 4  2 7 1 
1 1  9  12  19  11
 2   
2

 2  1 21 3  23 2

Matrix Multiplication

The matrix product AB is defined if and only if the number of columns of A equals the
number of rows of B. The product AB has as many rows as A and as many columns as B.
The order in which the matrices in a product are written is extremely important.

Example:
A m n Bn  m  C m m
Bn  m A m n  Dnn
A 23 B33  C23
If AB = C, an entry of cij of the product matrix is equal to the inner product of row i in
matrix A and column j of matrix B.
 1 0  3
2 1  6
A 23    0 4 2
2 
B33
1  3  2 1 1
C C12 C13 
A 23B33  C23   11
C 21 C22 C23 

C11 = (2)(1) + (1)(0) + (6)(2) = 14


C12 = (2)(0) + (1)(4) + (6)(1) = 2
 14  2  10
C13 = (2)(3) + (1)(2) + (6)(1) = 10 C 
 3 10  7 
C21 = (1)(1) + (3)(0) + (2)(2) = 3
C22 = (1)(0) + (3)(4) + (2)(1) = 10
C23 = (1)(3) + (3)(2) + (2)(1) = 7

8
Example:

 4
A31  2 B13  2 6 4
3 

 4
B13 A 31  C11  2 6 4 2
3 
 2(4)  6(2)  4(3)
 8  12  12  32
Example:
2 3 8  3
D33  1 7 9 E31  8
1 5 4 1 

2(3)  3(8)  8(1) 6  24  8 38 


D33 E31  F31  1(3)  7(8)  9(1)   3  56  9   68 
1(3)  5(8)  4(1)  3  40  4 47

Properties of Matrix Multiplication


1. A(BC) = (AB)C
2. A(B + C) = AB + AC
(A + B)C = AC + BC
Example:

1 0
 1  2 3 0  1
A B C  0 2
 3 4 1 1 2
1 1 

 1 0 
1  2 3 0  1  
A(BC)    2 
4 1 1 2 
0
 3 1 1  

 1  2 2  1  4  9
 
 3 4  3 4  6 19

9
1 0 
  1  2 3 0  1  
(AB)C        0 2
  3 4  1 1 2   
1 1 
1 0
 1  2  5 
   0 2
 5 4 11
1 1 
  4  9
 
 6 19
Note that, A(BC) = (AB)C

Example:
A(B + C) = AB + AC

1 0    2 0  2 1
A  B  C 
2 3  1 3  0 2
1 0     2 0  2 1 
A ( B  C)     1 
3  0 2 

 2 3  
1 0    4 1  4 1
  
 2 3  1 5   5 17

1 0  2 0 1 0  2 1
AB  AC      
2 3  1 3 2 3  0 2
 2 0  2 1  4 1
   
  1 9  4 8   5 17
Thus, A(B + C) = AB + AC

DETERMINANT

If a matrix is square, the elements of the matrix may be combined to compute a real-valued
number called the determinant. The determinant concept is of particular interest in solving
 3  7
simultaneous equations. Given A  
5
, the determinant of A can be denoted by
 9

10
3 7
either A or
9 5

The determinat of a (2 x 2) matrix


a a12 
Given A   11 A  a11 a22  a12 a21
a21 a22 

Example:
 3  7 3 7
A  A
 9 5 9 5
 (3)(5)  (7)( 9)  48
The determinant of a (3  3) matrix

 a11 a12 a13  a11 a12 a13 a11 a12


Given A  a 21 a 22 a 23  A  a 21 a 22 a 23 a 21 a 22
a31 a32 a33  a31 a32 a33 a31 a32

A  (a11 a22 a33 )  (a12 a23 a31 )  (a13 a21 a32 )


 (a31 a22 a13 )  (a32 a23 a11 )  (a33 a21 a12 )
Example:
3 0  2 3 0 2 3 0

A  6  8 1 A  6 8 1 6 8
0 3 4 0 3 4 0 3

| A | = (3)(–8)(4) + (0)(1)(0) + (–2)(6)(3)


–(0)(–8)(2) – (3)(1)(3) – (4)(6)(0) = 141

The Method of Cofactors

A generalized computational procedure for computing the determinant which can be


applied for all square matrices of size 22 and higher.

(i) Given matrix A with size nn. Cross off row i and column j in the original
matrix. The remaining elements form a submatrix of the original matrix.

11
1 2 3
 4 3  2 3  2 4
Example : A  2 4 3 M 11    M 12    M 13   
6 1 4 1 4  6 4 6 1 

until M33

(ii) The determinant of Mij = |Mij| is called the minor. The cofactor is found by
multiplying the minor either by +1 or -1 depending on the position of the
element. The formula for cofactor is Cij = (1)i+j |Mij|.

4 3
M 11   16  3  13 C11 = (–1)1+1 13 = 13
1 4

2 3
M 12   8  18  10 C12 = (–1)1+2 (10) = 10
6 4

2 4
M 13   2  24  22 C13 = (–1)4 (22) = 22
6 1

2 3
M 21   83  5 C21 = (–1)3 (5) = 5
1 4

1 3
M 22   4  18  14 C22 = (–1)4 (14) = 14
6 4

1 2
M 23   1  12  11 C23 = (–1)5 (11) = 11
6 1

2 3
M 31   6  12  6 C31 = (–1)4 (6) = 6
4 3

1 3
M 32   3  6  3 C32 = (–1)5 (-3) = 3
2 3

1 2
M 33   44  0 C33 = (–1)6 (0) = 0
2 4

12
The determinant can be found by expanding along any row i or any column j
according to the equation:
n
A   aij Cij any row i  1, 2, ..., n or
j 1

n
A   aij C ij any column j  1, 2, ..., n
i 1

 Select any row or column of the matrix.


 Multiply each element in the row (column) by its corresponding
cofactor and sum these products.

1 2 3  13 10  22
A  2 4 3 
Cij    5  14 11
6 1 4  6 3 0

|A| = 1(13) + 2(10) + 3(22) = 33 (expanding row 1)


or
|A| = 1(13) + 2(5) + 6(6) = 33 (expanding column 1)
or
|A| = 3(22) + 3(11) + 4(0) = 33 (expanding column 3)

If the objective is to find determinant, it is not necessary to compute the entire matrix or
cofactors. Need to determine only the cofactors for the row or column selected for
expansion.

PROPERTIES OF DETERMINANTS

1. If all elements of any row or column equal zero, the determinant is 0.


0 0
Example: B  B  (0)( 4)  (3)(0)  0
 3 4
2. If all elements in any row or column are multiplied by a constant k, the value of the
determinant is also multiplied with the constant k.

13
 2  6
A A  (2)(6)  (2)( 6)  24
2 6
Example:
 2  6
B  B  (2)(12)  (4)( 6)  48
4 12
B 2A
3. If any row (column) is a multiple of another row (column), the determinant equals
zero.
 2 2
G  G 0
Example:  3 3 (C1 = C2)

 2 4
H   H 0 (C2 = 2 X C1)
3 6
4. | A | = | AT |
5. | AB | = | A | | B |

6. The determinant for a diagonal matrix is the product of the diagonal elements.
 2 0
Example: C  C  (2)(5)  10
0 5

7. If any multiple of one row (column) is added to another row (column), the value of
the determinant is unchanged.
 1 2  8  10
A   3R2  R1  B
Example: 3 4  3 4
 A  B  2

8. If any two rows (or columns) are interchanged, the sign of the determinant changes.
 2  6   6 2
A B  (C1  C 2 )
6
Example:
2  6 2
|A| = 24 |B| = –24

14

You might also like