0% found this document useful (0 votes)
280 views22 pages

Topic 1.2: Matrices: (Or Elements) (Read As M by N) (M N Square)

The document provides information about matrices, including: 1. Matrices are rectangular arrays of numbers that can be added, subtracted, and multiplied. 2. Operations like addition and multiplication on matrices follow specific rules. For example, matrix multiplication is only defined if the number of columns of the first matrix equals the number of rows of the second matrix. 3. Finding the determinant, inverse, and using matrices to solve systems of linear equations are introduced as key concepts. Examples are provided to illustrate matrix operations and properties.

Uploaded by

Jeevan Krishnan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
280 views22 pages

Topic 1.2: Matrices: (Or Elements) (Read As M by N) (M N Square)

The document provides information about matrices, including: 1. Matrices are rectangular arrays of numbers that can be added, subtracted, and multiplied. 2. Operations like addition and multiplication on matrices follow specific rules. For example, matrix multiplication is only defined if the number of columns of the first matrix equals the number of rows of the second matrix. 3. Finding the determinant, inverse, and using matrices to solve systems of linear equations are introduced as key concepts. Examples are provided to illustrate matrix operations and properties.

Uploaded by

Jeevan Krishnan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

TMA1111 Mathematical Techniques Faculty of Information Science & Technology

TOPIC 1.2: MATRICES


Learning Outcomes:
1. To be able to add, subtract and multiply matrices.
2. To be able to find the determinant and inverse of a square matrix.
3. To be able to solve a system of linear equations using matrices.

1. INTRODUCTION

Definition: A matrix is a rectangular array of numbers. The numbers in the array are called the
entries (or elements) in the matrix.

A matrix with size m  n (read as m by n) is a matrix with m rows and n


columns. These m and n also determine the order (m = n; square) of the matrix.

A matrix with only one row is called a row matrix (example: matrix U), and a
matrix with only one column is called a column matrix (example matrix W).
 w1 
w 
U = u1 u2 un  W = 2
 
 
 wm 
U=(…)
An entry of a row i and a column j of a matrix A is denoted as aij.

Roti Canai → Row, Column arc = aij


Thus a general m  n matrix might be written as:
 a11 a12 a13 a1n 
a a22 a23 a2 n 
 21  m rows
A= 
 
 
 am1 am 2 am3 amn 

n columns

A matrix is normally denoted by an uppercase letter such as A, B, or C. A matrix


can also be denoted by [aij],[bij] or [cij]. Therefore, we have

TCK/ TCP (2020) Page 1 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

 a11 a12 a13 a1n  i=1


a a22 a23 a2n 
 21  i=2
A =  aij   
 
 
 am1 am 2 am3 amn 
j=1 j=2 j=3

A matrix with n rows and n columns is called a square matrix of order n, and
the entries a11, a22, a33, …, ann are known as the main diagonal of A

 a11 a12 a13 a1n  main diagonal of A


a a a23 a2n 
 21 22 
A =  aij   
 
 
 an1 an 2 an3 ann 

2. OPERATION ON MATRICES

Equality of Matrices
Definition: Two matrices A = [aij] and B = [bij] are equal if they have the same
size and their corresponding entries are equal (aij = bij for all i and j).

Example 1:
2 3 2 3
A=  , B=  ==> A = B only when x = 4
 4 9  x 9

EXERCISE: Find values for the p, q, r, and s if the matrices A and B are equal.
 1 − 1  p −1 
A = 2r − 3 , B =  2 q + 3
 
 0 5   0 s − 9 
Solution:
If A = B, then
p=1 , q+3 = –3 , 2r = 2 , s–9=5
q = –6 r=1 s = 14

TCK/ TCP (2020) Page 2 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

Addition and Subtraction of Matrices

Definition: If A = [aij] and B = [bij] are matrices both of sizes m  n, then their
sum, A+B is an m  n matrix resulting from the addition of the entries B to the
corresponding entries A i.e.
A + B = [aij + bij].
Their differences, A-B is an m  n matrix obtained by subtracting the entries of
B from the corresponding entries of A i.e.
A − B = [aij − bij]

Matrices of different sizes cannot be added or subtracted.

Example 2:
2 1 0 3 − 4 3 5 1
1 2 3
  
Let A = − 1 0 2 4 , B =  2 2 0 − 1 , C =  
 4 − 2 7 0  3 2 − 4 5   2 1 0

Find A+B and A-B. Also, find A+C, B+C, A−C and B−C.
A is 3 X 4, C is 2 x 3
Solution:
2 + ( −4) 1+ 3 0+5 3+1 
A + B =  −1+ 2 0+2 2+0 4 + ( −1)
 
 4 + 3 − 2 + 2 7 + ( −4) 0 + 5 
− 2 4 5 4
= 1 2 2 3
 
 7 0 3 5

2 − ( −4) 1 − 3 0−5 3 −1 
A − B =  −1− 2 0−2 2−0 4 − ( −1)
 
 4 − 3 − 2 − 2 7 − ( −4) 0 − 5 
 6 −2 −5 2 
= − 3 − 2 2 5
 
 1 − 4 11 − 5

Note that: A+C, B+C, A−C and B−C are undefined.

TCK/ TCP (2020) Page 3 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

Properties of Matrix Addition and Subtraction


Let A, B and C be m  n matrices.
1. A + B = B + A Commutative Property of Matrix Addition
2. A + (B + C) = (A + B) + C Associative Property of Matrix Addition

Scalar Multiplication
Definition: If A = [aij] is an m  n matrix and c is a scalar, the scalar multiple of
A by c is the m  n matrix given by
cA = c[aij]

The symbol -A represents the scalar product (−1)A. Moreover, if A and B are of
the same size, then A−B represents the sum of A and (−1)B. That is,
A−B = A + (−1)B
Example 3:
1 2 4  0 2 7 9 − 6 3 
Let A =   , B = − 1 3 − 5 , C= 
2 6 0   3 0 12 

1 2 4  0 2 7  9 − 6 3  29 − 16 10 
2 A − B + 3C = 2 −  + 3 =
2 6 0 − 1 3 − 5 3 0 12 14 9 41

Properties of Matrix Scalar Multiplication


Let A, B and C be m  n matrices and let c and d be scalars.
1. (cd)A = c(dA) Associative Property of Scalar Multiplication
2. 1A = A Scalar Identity
3. c(A + B) = cA + cB Distributive Property
4. (c + d)A = cA + dA Distributive Property

Matrix Multiplication
Definition: If A = [aij] is an m x n matrix and B = [bij] is an n  p matrix, the
product AB is an m  p matrix
AB = [cij] where,
n
cij =  aik bkj = ai1b1 j + ai 2b2 j + ai 3b3 j + ... + ainbnj
k =1

In order for the product of two matrices to be defined, the number of columns of
the first matrix must equal the number of rows of the second matrix.
Am x n x Bn x p = Cm x p
must be same
size of C

TCK/ TCP (2020) Page 4 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

AB  BA
1 
 
Example 4: Let A =  2 4 6 , B = 2 . Find A B and B  A .
 
 3
Solution:

A1 x 3 x B3 x 1 = C1 x 1

1 
A  B = 2 4 6 2
3
= (2  1) + (4  2) + (6  3)
= 28

B3 x 1 x A1 x 3 = C3 x 3

1 
B  A = 2  2 4 6
3
 (1 2) (1  4) (1  6) 
B  A = (2  2) (2  4) (2  6) 
 
 (3  2) (3  4) (3  6)  cBA = c12
2 4 6
= 4 8 12 
 
 6 12 18

 4 1 4 3
1 2 4 
Example 5: Let A =  , B = 0 − 1 3 1 . Find A B .
2 6 0
2 7 5 2
Solution:
A2 x 3 x B3 x 4 = C2 x 4 Roti Canai Row Columns

TCK/ TCP (2020) Page 5 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

AB = C
c c c c 
=  11 12 13 14 
c21 c22 c23 c24 
c11 c12 c13 c14
c21 c22 c23 c24
AB = 1 2 4   4 1 4 3
2 6 0 0 − 1 3 1 
   
2 7 5 2
j=1 j=2 j=3 j=4
i=1 ij = 11 12 13 14
1(4) + 2(0) + 4(2) 1(1) + 2(-1) + 4(7) 1(4) + 2(3) + 4(5) 1(3) + 2(1) + 4(2)

i=2 2(4) + 6(0) + 0(2) 2(1) + 6(-1) + 0(7) 2(4) + 6(3) + 0(5) 2(3) + 6(1) + 0(2)

 (14) + (20) + (42)


(11) +(2−1) +(47) (14) +(23) +(45) (13) + (21)+ (42) 
A B =  
(24) + (60) +(02) (21) +(6−1) +(07) (24) +(63) +(05) (23) + (61)+ (02) 
12 27 30 13
= 
 8 −4 26 12 

Properties of Matrix Multiplication


Let A, B, and C be matrices and let c be a scalar.
1. A(BC) = (AB)C Associative Property of Multiplication
2. A(B + C)=AB + AC Distributive Property
3. (A + B)C = AC + BC Distributive Property
4. c(AB) = (cA)B = A(cB)

Transpose of a Matrix
Definition: If A is an m  n matrix, the transpose matrix denoted by AT , is an n 
m matrix whose rows are the columns of A in the same order. In other words, AT
is obtained from A by interchanging the rows and columns of A.

 1 − 2 4
Example 6: Find transpose of A =  3 7 0 .
− 5 8 6

 1 3 − 5
Solution: AT = − 2 7 8 
 4 0 6 

TCK/ TCP (2020) Page 6 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

Example 7: Let A =  2 4 6, B = 1 2 3 .


Find A BT and AT  B .
Solution:
A  B T = 2 4 6 1 2 3
T

1 
= 2 4 6 2
3
= (2  1) + (4  2) + (6  3)
= 28

AT  B = 2 4 6  1 2 3
T

 2
= 4  1 2 3
6
2×1 2×2 2×3
= [4 × 1 4×2 4 × 3]
6×1 6×2 6×3
2 4 6
= [4 8 12]
6 12 18
Theorem: Transpose of Matrix
Let A and B denotes matrices of the same size, and let k denote a scalar.
1. If A is an m  n matrix, then AT is an n  m matrix
2. (AT ) = A
T

3. (kA ) = kAT
T

4. ( A + B)T = AT + B T

TCK/ TCP (2020) Page 7 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

3. DETERMINANT
Let A be a square matrix. The determinant is denoted by det(A) or A , and we
define det(A) to be a real number. The number det(A) can determine whether the
square matrix is singular or non-singular.

NOTE: 1. A singular matrix has no inverse.


2. We can write determinant of A as det (A) or A .

Order 1: A = [4]
det(A) = 4

Determinant for a 2x2 Matrix


a b 
If A =   is a square matrix with size 2x2, then its determinant is
c d 
a b
A= = ad − bc .
c d

Determinant for a Matrix with size n x n (n >1)


In general, the determinant of a square matrix of any size (2x2 and onwards) is
to evaluate with this method.
In this method, we will need to know minor of an entry, Mij and cofactor of an
entry, Cij before we may proceed to evaluate the determinant.

Minor of an entry
Minor of entry aij is given by the symbol M ij . It is the determinant of a square
matrix of order n −1 obtained by deleting the entries in the row and column in
which the given entry lies.

For example, given the matrix


 a11 a12 a13 
A = a21 a22 a23 
a31 a32 a33 
Let say, we want to get the minor of entry a21 .
First we delete the entries in row 2 and column 1, leaving the matrix of order 2 as
follow:
 a11 a12 a13 
a   a12 a13 
 a .
 21 a22 a23   32 a33 
a31 a32 a33 
The determinant of this matrix is called the minor of a21 , i.e

TCK/ TCP (2020) Page 8 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

a12 a13
M 21 = = a12a33 − a13a32
a32 a33
Cofactor of an entry
Cofactor , cij of the entry aij is Cij = (−1)i + j M ij

NOTE:
The only difference between a cofactor and a minor is the factor (−1)i+ j where
+ 1 , i + j = even
(−1) i + j = 
− 1 , i + j = odd
Hence, we may write “+1” as just “+” and “–1” as “–”.
A quick way for determining whether to use ‘+’ or “–” is as follows:
+ − + − + 
− + − + − 

+ − + − + 
 
− + − + − 
+ − + − + 
 
      

c11= (–1)1+1 = 1 c12= (–1)1+2 = - 1 c13 = (–1)1+3= 1


c21= (–1)2+1 =-1 c22= c23= (–1)i+j
c31= (–1)3+1 =1 c32= c33=

Example 11:
 4 1 0
Let A = − 9 3 4 . Find the cofactor matrix of A.
− 3 8 1
Solution:
 c11 c12 c13 
  
Cofactor matrix of A = cij = c21 c22 c23 

c31 c32 c33 
The cofactor of each of the entry are
c11= + c12= - c13 = +
c21= - c22= + c23= -
c31= + c32= - c33= +

3 4 −9 4 −9 3
c11 = + c12 = ( − 1 )1+ 2 c13 = ( − 1 )1+3
8 1 −3 1 −3 8
= +3(1) − 4(8) = − − 9 − 4(− 3) = +− 9(8) − 3(− 3)
= −29 = −3 = −63

TCK/ TCP (2020) Page 9 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

c 21 = c 22 = c 23 =

c31 = c32 = c33 =

 4 1 0
A = − 9 3 4
− 3 8 1
3 4 −9 4 −9 3
c11 = ( − 1 )1+1 c12 = ( − 1 )1+ 2 c13 = ( − 1 )1+3
8 1 −3 1 −3 8
= +3(1) − 4(8) = − − 9 − 4(− 3) = +− 9(8) − 3(− 3)
= −29 = −3 = −63
1 0 4 0 4 1
c21 = − c22 = + c23 = −
8 1 −3 1 −3 8
= −1(1) − 0(8) = 4(1) − 0(− 3) = −4(8) − 1(− 3)
= −1 =4 = −35
1 0 4 0 4 1
c31 = + c32 = − c33 = +
3 4 −9 4 −9 3
= 4−0 = −(16 − 0 ) = 12 − (− 9)
=4 = −16 = 21

− 29 − 3 − 63

Hence,
  cij =  − 1 4 − 25
 4 − 16 21 

Steps to Evaluate the Determinants of a square matrix A of Order n ( > 1)


Step 1: Select any row/column of A.
Step 2: Get the cofactor of each of the entries for the selected row/column.
Step 3: The determinant is the sum of the product of cofactors and entries.

TCK/ TCP (2020) Page 10 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

Example 13: Find |A|.

 12 − 1 3   4 1 0
   
a) A =  − 3 1 − 1 b) A = − 9 3 4
− 10 2 − 3 − 3 8 1

Solution:
a) By choosing the first row,
1 −1 − 3 −1 −3 1
c12 = (− 1) c13 = (− 1)
1+ 2 1+3
c11 = +
2 −3 − 10 − 3 − 10 2
= (1)(− 3) − (− 1)(2) = −(− 3)(− 3) − (− 1)(− 10 ) = (− 3)(2) − 1(− 10 )
= −1 =1 =4
Thus,
A = a11c11 + a12c12 + a13c13
= (12 )(− 1) + (− 1)(1) + (3)(4)
= −1
OR, (as in cross product of 2 vectors)
1 −1 −3 −1 −3 1
A = 12 − (−1) + 3
2 −3 − 10 −3 − 10 2
= (− 1)12 + 1(− 1) + 4(3)
= −1

Exercise: Try to get the determinant of this matrix by using other row/column.

b) The cofactor of this matrix is already found in previous example, ie.


− 29 − 3 − 63  4 1 0
 
cij =  29 4 − 35 . A = − 9 3 4
 4 − 16 21  − 3 8 1
To find the determinant, first we need to decide which row/ column to use.

Let choose 1st row, then


|A| = (4)(–29) + (1)(–3)+ (0)(–63) = –119

Note that, we may use other row/ column. For example,


By using 3rd column,
|A| = (0)(–63) + (4)(–35)+ (1)(21) = –119

TCK/ TCP (2020) Page 11 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

NOTE: The determinant of a matrix remains the same no matter which row/
column is used. A tip to save calculation steps is to use the row or column with
many zeros if any.

Properties:
1. If A has a zero row (or column), |A|= 0.
2. If two rows (or columns) of A are identical, |A|= 0.
3. If A is upper (or lower) triangular, then |A| is equal to the product of the main
diagonal entries.

1 2 3
B = 0 5 6 → det(B)=1x5x9 = 45
0 0 9
Example 8: Determinants of 2  2 and 3  3 Matrices
Find the determinant for the following matrices:
1 2 3 1 0 1
3 1     
(a) A=  (b) B = − 4 5 6 (c) A = 1 1 2
 4 − 2  7 − 8 9 1 2 1
Solution:
3 1
(a) det(A) = =3(-2) – 4(1) = -10
4 −2

1 2 3
(b) B = − 4 5 6
 7 − 8 9
By selecting 1st row,
5 6 −4 6 −4 5
det(B) = 1 −2 +3
−8 9 7 9 7 −8
= 1[(5)(9)- (6)(–8)] -2[(–4)(9)-(6)(7)] + 3[(–4)(–8) –(5)(7)]
= 1(93) − 2(−78) + 3(−3)
= 240

1 0 1
(c) A = 1 1 2
1 2 1
By selecting 1st row,

TCK/ TCP (2020) Page 12 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

1 0 1
1 2 1 1
A = 1 1 2 =1 − 0 +1 = −2
2 1 1 2
1 2 1

Example 9:
 0 1 4
Calculate A for matrix .
A =  − 2 2 2
 
 2 5 3
Solution:
To save calculation steps, we can expand along the 1st row or 1st column because
it contains one zero as compare with other rows or columns. Now, let’s say we
expand along 1st column, thus the solution is
0 1 4
A = −2 2 2
2 5 3
1 4 1 4
= 0 − ( −2) +2
5 3 2 2

= 2(3-20)+2(2-8)
= - 46

4. THE INVERSE OF A MATRIX

The Identity Matrix


The n  n matrix that consists of l’s on its main diagonal and 0’s elsewhere is
called the identity matrix of order n and is denoted by I.
1 0 0 0
0 1 0 0
 
I n = 0 0 1 0
 
 
0 0 0 1 
Note that an identity matrix must be a square matrix. So, when the order is
understood to be n, we can denote In simply by I. The identity matrix has the
property that AIn = A and InA = A.

The Inverse
Definition: Let A be an n  n square matrix. If there exists a matrix B of same size
such that
AB = BA = I

TCK/ TCP (2020) Page 13 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

then A is said to be invertible and B is called the inverse of A and is denoted by


A−1 .
Alternatively, AA-1 =1n= A-1A

Example 10:
− 5
2 3 5
Let A =   , B= 
− 1 3 1 2
 2 − 5 3 5 1 0 3 5  2 − 5 1 0
AB =   = = I BA =   = = I
− 1 3  1 2 0 1 1 2 − 1 3  0 1

AB = BA = I, therefore, B is the inverse of A.

The Inverse of a 2 x 2 Matrix

For a 2 x 2 matrices, a simple formula can be used.


a b 
If A is a 2  2 matrix given by A= 
c d 
then A is invertible if and only if ad − bc  0 , the inverse is given by
1  d − b
A −1 =
ad − bc − c a 
Recall:
The denominator ( ad − bc ) is called the determinant of the matrix A (det A).
Example 11:
Let A = 
1 2
. Find the inverse of A.
 
1 3
Solution:
1  3 − 2  3 − 2
A =−1
=
(1)( 3) − (1)( 2) − 1 1  − 1 1 

Inverting n x n Matrices using the Adjoint Matrix

If A is an invertible matrix, then


1
A −1 =
adj( A)
det( A)
If A is an n  n matrix and the cofactor of matrix of A, (Cij) is

TCK/ TCP (2020) Page 14 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

 C11 C12 C1n 


C C22 C2 n 
 21 
 
 
Cn1 Cn 2 Cnn 
The transpose of this matrix is called the adjoint of A and is denoted by adj(A).
Recall that the cofactor is defined as Cij = (−1)i + j M ij .

Steps to Find the Inverse of the Matrix A (n >1)


Step 1: Find cofactor of matrix of A, (Cij).
Step 2: Find the determinant of A, |A|.
Step 3: Find the inverse of A using the formula.

Example 12:
1 − 1 0 
 
Find the inverse of A = 1 0 − 1 .
6 − 2 − 3
Cij
roti canai → row column
Solution:
Step 1: Find cofactor of matrix of A, (Cij).
Cij = (−1)i + j M ij
c11= + c12= - c13= +
c21= - c22= + c23= -
c31= + c32= - c33= +

0 −1 1 −1 1 0
C11 = (−1)1+1 C12 = (−1) 1+ 2 C13 = (−1)1+3
−2 −3 6 −3 6 −2
= 0 − (−2)( −1) = −(1)( −3) − (6)( −1) = +(1)(−2) − (0)(6)
= −2 = −3 = −2
−1 0 1 0 1 −1
C 21 = (−1) 2+1 C 22 = (−1) 2+ 2 C 23 = (−1) 2+3
−2 −3 6 −3 6 −2
= −(−1)( −3) − (−2)(0) = +(1)( −3) − (6)(0) = −(1)(−2) − (6)(−1)
= −3 = −3 = −4

TCK/ TCP (2020) Page 15 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

−1 0 1 −1
C31 = (−1)3+1 C32 = (−1) 3+ 2 1 0 C33 = (−1)3+3
0 −1 1 −1 1 0
= +(−1)(−1) − (0)(0) = −(1)(−1) − (1)(0) = +(1)(0) − (1)(−1)
=1 =1 =1
 − 2 − 3 − 2
 
Therefore, cij =  − 3 − 3 − 4

 1 1 1 
NOTE:
 − 2 − 3 − 2 − 2 − 3 1
  adj(A) =  − 3 − 3 1
cofactor =  − 3 − 3 − 4 transpose
 1 1 1  − 2 − 4 1

Step 2: Find the determinant of A, |A|.


By using 1st row,
|A| = 1(-2) + (-1)(-3)+ 0(-2)
=1

By using 3rd row,


|A| = 6(1) + (-2)(1)+ (-3)1
=1

NOTE: Remember that, the determinant is the sum of the product of cofactors
and entries.

Step 3: Find the inverse of A using the formula.


−1 1
Therefore, the inverse of A is A = adj( A)
det( A)
− 2 − 3 1 − 2 − 3 1
= − 3 − 3 1 =  − 3 − 3 1
1
1   
− 2 − 4 1 − 2 − 4 1

NOTE: Notice that a square matrix A is invertible if and only if the det(A)  0.

TCK/ TCP (2020) Page 16 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

5. SYSTEMS OF LINEAR EQUATIONS

Linear Equations
Definition: A linear equation in n variables x1 , x2 ,..., xn is an equation of the
following form:
a1 x1 + a 2 x2 + ... + a n xn = b
where a1 , a 2 ,..., a n and b are scalars (real numbers). The variables, x1 , x2 ,..., xn , are
called unknowns.

2x – 5y + 7 = 0
x-5y – 2 = 9
Systems of Linear Equations
A finite set of linear equations is called a system of linear equations:
a11x1 + a12 x2 + ... + a1n xn = b1
a21x1 + a22 x2 + ... + a2 n xn = b2

am1x1 + am 2 x2 + ... + amn xn = bm


where aij 's and bi's are real numbers.

A sequence of numbers s1, s2 ,s3 ,…,sn is called the solution to the system of
equations if x1 = s1 , x2 = s 2 , x3 = s3 ,..., xn = s n is a solution of all the equations in the
system.

However, not all systems of linear equations have solutions. A system of


equations is said to be consistent if there is at least one solution; otherwise, it is
said to be inconsistent.

y y y
L1 L1 and L2
L1
L2

L2

x x x

One Solution No Solution Infinitely Many


Solutions
Augmented Matrix & Matrix Equation

A system of linear equations could be represented in a matrix form either using


augmented matrix or matrix equation form, AX = B (A is called coefficient

TCK/ TCP (2020) Page 17 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

matrix).

For example,
System Augmented Matrix Matrix Equation
x1 − 4 x2 + 3x3 = 5  1 −4 3  5   1 − 4 3   x1   5 
− 1 3 − 1  − 3 − 1 3 − 1  x  = − 3
− x1 + 3x2 − x3 = −3     2   
 2 0 − 4 6   2 0 − 4  x3   6 
2 x1 − 4 x3 = 6

Solving Systems of Linear Equations using Inverse


Given AX = B , since we know that A−1A = I and I A = A
then when, A−1 AX = A−1B  IX = A−1B , therefore the solution is
−1
X=A B
Steps to Solve Linear Equations by its Inverse
Step 1: Write the system into matrix form: AX = B
Step 2: Find the cofactor of A.
Step 3: Find the |A|.

Step 4: Solve the system using X = A−1B .

−1
NOTE: A =
1
A
adjA =
1
A
cij   T

Example 13:
Solve the following system:
x1 − x2 = −2
x1 − x3 = −3
6 x1 − 2 x2 − 3x3 = −10
Solution:
Step 1: Write the system into matrix equation form.
AX = B
1 − 1 0   x1   − 2 
1 0 − 1  x  =  − 3 
  2   
6 − 2 − 3  x3  − 10

TCK/ TCP (2020) Page 18 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

1 − 1 0   x1  −2
     
Note that, A = 1 0 − 1 , X =  x2  and B =  − 3  .
6 − 2 − 3  x3  − 10

Step 2: Find the cofactor of A.


Step 3: Find the |A|.
However, for this question, the cofactor, |A| and A-1 have been found in the
above Example 12. (Refer to that example on how to find cofactor, |A| and A-1.).

 − 2 − 3 − 2 − 2 − 3 1
  adj(A) =  − 3 − 3 1
cofactor =  − 3 − 3 − 4 transpose
 1 1 1  − 2 − 4 1
Step 4: Solve the system using X = A−1B .
Therefore, X = A −1 B
1
= adj( A)  B
A
− 2 − 3 1  − 2 
=  − 3 − 3 1  − 3 
1
1
− 2 − 4 1 − 10
(−2)( −2) + (−3)( −3) + (1)( −10) 
=  (−3)(−2) + (−3)(−3) + (1)(−10) 
 
(−2)(−2) + (−4)( −3) + (1)(−10)
 4 + 9 − 10 
=  6 + 9 − 10 
 
4 + 12 − 10
 x1 
 3  
X =  x2 
= 5 
   x3 
6
Hence x1 = 3, x2 = 5 and x3 = 6.

Example 14:
Solve the following system of linear equations:
x + 2y = 2
x − y = −1

TCK/ TCP (2020) Page 19 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

Solution:
AX = B
1 2   x   2 
1 − 1  y  = − 1
    
As A is a matrix order 2, we may directly proceed to step 3 due to its cofactor is
1  d − b
actually already given in the formula of its inverse: A−1 =
ad − bc − c a 
Hence, X = A−1B .
1  − 1 − 2  2 
= [It is better to multiple the two matrices first.]
− 3 − 1 1  − 1
1 (− 1)(2) + (− 2)(−1)
=
− 3  (− 1)(2) + (1)(−1) 
1 0
=
− 3 − 3
0 
= 
1 
Hence, x = 0, y = 1 .

EXERCISE:
Solve the following linear system by using the inverse.
4 x − 5 y − 6 z = −1
3x − 2 y = −5
(a) x − 2 y − 5 z = −12 (b)
x + 3 y = 13
2x − y = 7

Answer: (a) x = 2 , y = – 3 , and z = 4 (b) x = 1, y =4


Solution:
(a)

4 x − 5 y − 6 z = −1
Given x − 2 y − 5 z = −12
2x − y = 7
AX = B
 4 − 5 − 6  x   − 1 
1 − 2 − 5  y  = − 12
    
2 − 1 0   z   7 

Now, we need to find cofactor matrix and the determinant of A,


Cij = (−1)i + j M ij

TCK/ TCP (2020) Page 20 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

−2 −5 1 −5 1 −2
c11 = + c12 = − c13 = +
−1 0 2 0 2 −1
= 0 − (−5)( −1) = −0 − (−10) = −1 − (−4)
= −5 = −10 =3
−5 −6 4 −6 4 −5
c21 = − c22 = + c23 = −
−1 0 2 −0 2 −1
= −0 − 6 = 0 − (−12) = −− 4 − (−10)
=6 = 12 = −6
−5 −6 4 −6 4 −5
c31 = + c32 = − c33 = +
−2 −5 1 −5 1 −2
= 25 − 12 = −− 20 − (−6) = −8 − (−5)
= 13 = 14 = −3

Cofactors of A,
− 5 − 10 3 
 
cij =  6 12 − 6
 13 14 − 3

By using 1st row,


A = (4)( −5) + (−5)( −10) + (−6)(3) = 12

Finally, the solution to the system is:


 X = A−1B
1
= adjA  B
A
 − 5 6 13   − 1 
= − 10 12 14  − 12 
1 
12
 3 − 6 − 3  7 
2
= − 3
 4 
 x = 2 , y = –3 , and z = 4 .

(b) AX = B
3 −2   x   −5
1 3   y  = 13 
    

TCK/ TCP (2020) Page 21 of 22


TMA1111 Mathematical Techniques Faculty of Information Science & Technology

1  d − b
A−1 =
ad − bc − c a 
1  3 2
=
9 − (− 2 ) − 1 3
1  3 2
=
11 − 1 3
1  3 2 − 5
X = A−1B =
11 − 1 3  13 
1 
= 
4
Hence, x = 1, y =4

TCK/ TCP (2020) Page 22 of 22

You might also like