You are on page 1of 21

B3001/UNIT6/1

________________________________________________________________________

MATRICES
(Introduction and types of matrices; problem
solving on simultaneous equation using
matrices method)

Unit

General Objectives
To know the different types of matrices and

understand how to apply it on simple algebra


problem solving.

Specific Objectives
Upon completing this module, you should be
able to:
Define matrix and identify the notation used
in matrices.
Solve matrix problems that involve simple
matrix algebra operations.
Define and determine the size of a matrix, a
square matrix, a symmetrical matrix,
diagonal matrix, identity matrix, and
transpose of a matrix.

Prepared by : Nur Hidayah Othman

Page 1

B3001/UNIT6/2
________________________________________________________________________

INPUT

6.0

INTRODUCTION

Matrices are sets of numbers that are arranged in rectangular forms. It is a


rectangular array of numbers. These numbers are arranged inside a round or
square bracket. Look at the examples shown below.

2 3 8

2

5
4

3 9 7

5 2 3

6 1

9 6
1 4

2 3

It is important to study the fundamentals of matrices first and get a good


introduction on how to apply simple algebra operations on matrices. This can
help in solving engineering problems. For example, you can use matrices to solve
systems of linear simultaneous equations.

6.1 FUNDAMENTALS OF MATRIX


Each number inside a matrix is called an element of the matrix. These numbers
are arranged in rows and columns.
Rows are the horizontally arranged elements of the matrix
For example, the shaded region in the matrix below is the second row of the
matrix.
1

0
0

4
3
2
5

4
6

Prepared by : Nur Hidayah Othman

Page 2

B3001/UNIT6/3
________________________________________________________________________
Columns are the vertically arranged elements of the matrix.
For example, the shaded region in the matrix below is the second column of the
matrix.
1 4 4

0 3 4
0 2 6

2 5
2

Note: It is common practice to use bold capital letters or underlined capital letter
like A or A to represent a matrix, and small letters to represent the elements.

6.2 SIZE OF A MATRIX


The size of a matrix is the number of rows and columns that it has. If a matrix has
3 rows and 4 columns, then its size is 3 x 4.

Lets look at the following matrix.

1 4 4 7

A = 8 3 0 1
5 3 9
6

How many rows and columns do you see?


Do you agree that the size of matrix A is 3 x 4?

Prepared by : Nur Hidayah Othman

Page 3

B3001/UNIT6/4
________________________________________________________________________
Example 6.1:
State the size of the following matrix.
9 1
4

6
6
3
3 3
9

7 4 0

Solution:
There are 4 rows and 3 columns. Therefore, the size of this matrix is 4 x 3.
For a matrix A of size 3 x 4, you can use the notation A34 to represent the matrix.
In general, any matrix can be represented by the notation matrix Aik with
i = 1, 2, 3, .
k =1, 2, 3,
The first subscript, i, represents the rows and the second subscript, j, represents
the columns.

Prepared by : Nur Hidayah Othman

Page 4

B3001/UNIT6/5
________________________________________________________________________

ACTIVITY 6a
6.1

State the size of each of the following matrices


a.

3

b. 4
5

1 0 2

c. 3 1 4
2 7 6

3 2

d. 1 9
5 7

6.2

3 5 3

Referring to matrix B = 0 8 4 , state the element at


1 7 2

a. b23
b. b21
c. b31

Prepared by : Nur Hidayah Othman

Page 5

B3001/UNIT6/6
________________________________________________________________________

Feedback for Activity 6a

6.1
a. 1 x 2
b. 3 x 1
c. 3 x 3
d. 3 x 2

6.2
a. b23 = 4
b. b21 = 0
c. b31 = -1

Prepared by : Nur Hidayah Othman

Page 6

B3001/UNIT6/7
________________________________________________________________________

INPUT

6.3

ADDITION, SUBTRACTION AND MULTIPLICATION OF MATRIX

6.3.1 MATRIX ADDITION


The first algebra operation we are going to learn is how to add two matrices. Matrix
addition can only be performed on matrices that have the same size. The result of a
matrix addition is a new matrix that is of the same size. All we need to do is to match the
elements that are at the same position in their matrices. For example, element a12 should
be matched to element b12 to produce element c12 .

a11

a
If A = 21
:

a
m1

so

a1n

a 22 : a 2 n
and B =
:
:
:

..... ..... a mn
a12

b11 b12 : b1n

b21 b22 : b2 n
:
:
:
:

m1 ..... ..... bmn

C=A+B

a11 b11

a b
= 21 21
:

a b
m1
m1

a12 b12
a 22 b22
:
....

Prepared by : Nur Hidayah Othman

a1n b1n

.... a 2 n b2 n

:
:

.... a mn bmn
....

Page 7

B3001/UNIT6/8
________________________________________________________________________
Example 6.3 :
Given that,

3 1 4 10

A 1
3 3 2
7 1 5 3

2 5 8 0

dan B 4 1 3 0
1 3 0 1

determine A + B.

Solution:

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

A B 1 (4)
3 1
3 (3) (2) 0
(7) 1 1 (3)
50
3 (1)

4 4 10
1

0 2
A + B = 3 4
6 2 5
2

6.3.2 MATRIX SUBTRACTION


Like matrix addition, matrix subtraction can only be performed on matrices that
have the same size. The result of a matrix subtraction is a new matrix that is of
the same size too. Similarly,

a11

a
If A = 21
:

a
m1

a1n

a 22 : a 2 n
and B =
:
:
:

..... ..... a mn
a12

a11 b11

a 21 b21
Then, C = A B =
:

a b
m1 m1

Prepared by : Nur Hidayah Othman

b12

b21
:

b
m1

a12 b12
a 22 b22
:
....

.... b1n

b22 .... b2 n
:
:
:

.... .... bmn


b12

a1n b1n

.... a 2 n b2 n

:
:

.... a mn bmn
....

Page 8

B3001/UNIT6/9
________________________________________________________________________
Example 6.4 :
Given that,

3 1 4 10

A 1
3 3 2
7 1 5 3

2 5 8 0

and B 4 1 3 0
1 3 0 1

determine A B.

Solution:
Then,
3 (2) (1) 5 4 (8) 10 0

A B 1 (4)
3 1
3 (3) (2) 0
(7) 1 1 (3)
50
3 (1)

5 6 12 10

AB 5
2 6 2
8 4 5
4

6.3.3 MATRIX MULTIPLICATION


Matrix multiplication is a little bit more complicated. In order to be able
to multiply two matrices AB, we have to ensure that the number of columns in
matrix A is the same as the number of rows in matrix B. That means we can
multiply matrix Amn with matrix Bnk because matrix A has n columns and matrix
B has n rows too. The result is a new matrix that has m rows and k columns.
The actual multiplication process involves taking a row i from matrix A
and matching it with a column j from matrix B. The result becomes the element
ij of the new matrix.

Prepared by : Nur Hidayah Othman

Page 9

B3001/UNIT6/10
________________________________________________________________________
The operation is as follows:

a11

a
If A = 21
:

a
m1

a1n

a 22 : a 2 n
and B =
:
:
:

..... ..... a mn
a12

matrix m x n

b11 b12 .... b1k

b21 b22 .... b2 k


:
:
:
:

j1 .... .... b jk
matrix j x k

Remember!
Multiplication can only
happen if n = j

then, C = AB with size m x k

c11

c
Then, C = 21
:

c
m1

.... c1k

c 22 .... c 2 k
:
:
:

.... .... c mk
c12

where c11 = a11 x b11 + a12 x b21 + a13 x b31+ + a1n x bj1
c12 = a11 x b12 + a12 x b22 + a13 x b32 + + a1n x bj2
c21 = a21 x b11 + a22 x b21 + a23 x b31 + + a2n x bj1
.
.
.

cmk = am1 x b1k + am2 x b2k + am3 x b3k + + amn x bjk

Prepared by : Nur Hidayah Othman

Page 10

B3001/UNIT6/11
________________________________________________________________________
Example 6.5:

5 2
3 7
and B

Find the multiplication of A


0 1
1 1
Solution:

5 2 3 7
5 (3) 2 1 5 7 2 (1)

AB
0 1 1 1
0 (3) 1 1 0 7 1 (1)
15 2 35 2

=
0 1
0 1
13 33

AB =
1 1

Example 6.6:
Find the products of matrix A and B, given that,
1
1 0

0
2

2 7 8
A
and B 3 1

0 1 4
4

6 2

Solution:
The size of matrix A is 4 x 3 and the size of matrix B is 3 x 2. Therefore we can
multiply them. The new matrix will be of size 4 x 2.
1 0 0 (1) 1 5
1 2 0 (3) 1 4

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


AB
0 2 1 (3) (4) 4 0 0 1 (1) (4) 5

6 2 2 (3) 1 4
6 0 2 (1) 1 5

Prepared by : Nur Hidayah Othman

Page 11

B3001/UNIT6/12
________________________________________________________________________
005
204

4 21 32 0 7 40

0 3 16 0 1 20

12 6 4 0 2 5

5
6

47
57
AB
19 21

10

Note: We cannot find the product of BA because the number of columns in matrix B is
not the same as the number of rows in matrix B.

Prepared by : Nur Hidayah Othman

Page 12

B3001/UNIT6/13
________________________________________________________________________

ACTIVITY 6b

6b1

Based on the following matrices,

3 7

A =
9 5

4
3

B =
3 5

2
C =
6

4 2

D =
5 7

determine:
a. A + B
b. A C
c. D + (B A)
d. B + C

6b2

2 1
and B =
Given that A =
1
4

0 1

,
2 3

find:
a. AB
b. BA

6b3

3 5 3

If M = 0 8 4 and N =
1 7 2

2

1 ,
5

Find the product of MN.

Prepared by : Nur Hidayah Othman

Page 13

B3001/UNIT6/14
________________________________________________________________________

Feedback for Activity 6b

6b1
a.

6 11

6 0

b.

no solution.

c.

4 5

7 3

d.

no solution.

a.

2 1

2 1

b.

4 1

8 1

6b2

6b3

4

MN = 28
15

Prepared by : Nur Hidayah Othman

Page 14

B3001/UNIT6/15
________________________________________________________________________

INPUT

6.4

TYPES OF MATRICES

6.4.1 SQUARE MATRIX


A square matrix is a matrix where the number of rows is equal to the number of
columns. The following examples are square matrices.
9
3 2 16

4 5 12 23
0 21 17
3

1 9 4 15

3 5 3

0 8 4
1 7 2

4
3

6.4.2 DIAGONAL MATRIX


If all the elements of a square matrix consist of zeros except the diagonal, then
this matrix is called a diagonal matrix. The following examples are diagonal
matrices.

a11 0

0 a 22
0
0

0
a33

3 0

0 5

3 0 0

0 8 0
0 0 2

6.4.3 IDENTITY MATRIX


If all the elements of a diagonal matrix consist of the value 1, then the matrix is an
identity matrix. The following examples are identity matrices.

1 0 0

I = 0 1 0
0 0 1

Prepared by : Nur Hidayah Othman

1 0

I =
0 1

0
I=
0

0 0 0

1 0 0
0 1 0

0 0 1

Page 15

B3001/UNIT6/16
________________________________________________________________________
An identity matrix is special because when you multiply a matrix with it or when
you multiply it with a matrix, the matrix does not change. For example:
AI = A

IB = B

MI = M

6.4.4 TRANSPOSE OF MATRIX


When you interchange the rows of a matrix with its columns, you would have
converted a matrix Amn to another matrix Anm. In other words, a matrix of size m
x n now is size n x m. This new matrix is called the transpose of a matrix. The
symbol for a transpose of a matrix A is AT.
Lets look at the following example.

a11 a12

If A = a 21 a 22
a

31 a32

a12
a
AT = 11
a 21 a 22

then,

a13

a 23

Example 5.7:
2 0 0

If A = 2 1 6 then, transpose matrix of A, AT =


6 0 1

6
2 2

0
0 1
0 6 1

Shown that, the first row becomes the first column, the second row becomes the second
column and so on.

Transpose for the transpose of matrix given the original matrix A


(AT)T = A

Some important properties relating to transpose are:


(AB)T = BTAT
(ABCZ)T = ZT..BTAT
(A + B)T = AT + BT
Prepared by : Nur Hidayah Othman

Page 16

B3001/UNIT6/17
________________________________________________________________________
6.4.5 SYMMETRIC MATRIX
When you interchange the rows of a matrix with its columns, you would have
converted a matrix Amn to another matrix Anm. In other words, a matrix of size m
x n will now be of size n x m. This new matrix is called the transpose of a matrix.
The symbol for a transpose of a matrix A is AT. Lets look at the following
example.
A = AT

(symmetric)

Example 6.8:
Determine whether the following matrices are symmetric or not.

a)

1 2 3

2
3
6

b)

1 8 6

8 2 0
5 0 3

c)

1 2 3

2 0 5
3 5 4

d)

1 6 7

6 2 3
7 3 9

Solution:

a)

not symmetric

b)

not symmetric

c)

is symmetric

d)

is symmetric

Prepared by : Nur Hidayah Othman

Page 17

B3001/UNIT6/18
________________________________________________________________________

AKTIVITI 6c

6c.1

Observe the following matrices:

3 0

A =
0 5

2 4

B =
3 2

0 0 1

C = 0 1 0
1 0 0

3

5
D=
5

3

2 4 6

E =
4 6 8

1 0

F =
0 1

Determine of the above matrices are of the following types:

6c.2

a)

Diagonal matrix

b)

Square matrix

c)

Symmetric matrix

d)

Identity matrix

1 2

If A = 4 3 , determine AT.
3 0

Prepared by : Nur Hidayah Othman

Page 18

B3001/UNIT6/19
________________________________________________________________________

Feedback for Activity 6c


6c.1

6c.2

a)

Diagonal matrix: A and F

b)

Square matrix: A, B, C and F

c)

Symmetric matrix: C and F

d)

Identity matrix: F

1 4 3

AT =
2 3 0

Prepared by : Nur Hidayah Othman

Page 19

B3001/UNIT6/20
________________________________________________________________________

SELF ASSESSMENT
6.1

Given two matrices A and B, where

1 3

A = 2 5 and B =
0 7

2 0

1 3 ,
1 2

evaluate:

6.2

If

a.

A+B

b.

AB

1 2

A = 7 3 and B =
5 9

3 5 3

0 8 4 ,
1 7 2

evaluate:
a. BA
b. AI
c. IB
d. B2

6.3

(Note: B2 = B x B )

Given that

2 7

A = 3 0 and B =
9 1

9 3 0

,
1 2 4

Prove that (AB)T = BT AT.

Prepared by : Nur Hidayah Othman

Page 20

B3001/UNIT6/21
________________________________________________________________________

SOLUTIONS TO SELF ASSESSMENT

6.1

6.2

6.3

a)

3 3

A + B = 1 8
1 9

a)

23 6

76 60
58 37

b)

c)

d)

12 34 5

4 92 40

5 65 35

b)

1 3

A B = 3 2
1 5

25 8 28

AB = 27 9
0

80 29 4
25 27 80

(AB) = 8 9 29

28 0 4
T

25 27 80

B A = 8 9 29

28 0 4
T

Therefore, (AB)T = BT AT.

Prepared by : Nur Hidayah Othman

Page 21

You might also like