0% found this document useful (0 votes)
21 views

Solution of System of Linear Equations

Uploaded by

rommel baldago
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)
21 views

Solution of System of Linear Equations

Uploaded by

rommel baldago
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/ 15

SOLUTION OF SYSTEM OF LINEAR EQUATIONS

(by Matrices and Determinants)


By Sir Ernesto T. Anacta

INTRODUCTORY CONCEPTS Note: A matrix of order 1 x 1 is just a scalar quantity and can
be written in a usual notatin (without brackets). Thus [4] can
Matrices are rectangular array of elements arranged in rows simply be written as 4.
and columns and are enclosed by a pair of brackets “[ ]”. 2. Column Matrix – a matrix of order m x 1 (i.e., two or more
They obey to certain rules of operations such addition, rows and only one column). This is also called a column
subtraction, multiplication, inversion, etc. (as will be vector.
discussed later in this handout). The elements of a matrix can
be scalar quantities (numbers), functions, operators, or sub- Example 2: Column Matrix
matrices.  4 
 
1 0
Generally, a matrix takes the form: C=   C=  
5 1 
 
 a11 a12 a13  a1n    7 
 
 a 21 a 22 a 23  a 2n  3. Rectangular Matrix – a matrix of order m x n where m  n.
A = [aij] =  a31 a32 a33  a 3n  (1) All elements of a rectangular matrix are non-diagonal
 
       elements, and its determinant cannot be computed. Row and
a  a mn  column matrices can also be considered as a rectangular
 m1 a11 a11
matrix.
Notes:
Example 3: Rectangular Matrix
1. In some textbooks, a matrix is represented by an italicized
uppercase letters (e.g. A, B, C, etc.) or a double subscripted  3 2
1 2 2 3  
E = 1 0  1 0
lowercase letters (e.g., aij, bmn, crs, etc.). In our case, we will just 5 1
F=  
use the uppercase letter (with or without subscripts) to represent a   2  1
matrix. 5 7 4 2  
 0 4 
2. The pair of brackets “[ ]” should strictly be used to denote a
matrix as we will also be using a pair of vertical lines “| |” as 4. Square Matrix – a matrix that has the same numbers of
symbol of determinant of a matrix. Moreover, the symbol “{ }” rows and columns (i.e., m = n). Thus, it has an order of m x m
will be used to represent a vector. or n x n. In a square matrix the elements aij where i = j are
3. As can be seen in (1), the arrangement of elements (or entries) in diagonal elements, while the elements aij where i  j are non-
a matrix can be described either horizontally (rowwise), vertically diagonal elements.
(columnwise) and diagonally. The specific location (or address)
of each entry is represented by the two subscripts i (representing Example 4: Square Matrix
row location) and j (representing column location). These
1 2 2
subscripts cannot be interchanged. 1 2 
G=   H = 1 0  1
1 0  5 7 4 
REMEMBER THIS!!!
Note: In matrix M, 1, 0 and 4 are the main diagonal elements,
Row location while 2, –1, –1, 3, 5 and 7 are non-diagonal elements.
aij 5. Null Matrix – a matrix of any order with all elements equal
Column location to zero. This is equivalent to 0 in the scalar notation. In
general, this is represented by 0 irrespective of its order.
Thus in (1), a23 is the element of matrix A in the 2nd row and
3rd column, a31 being the 3rd row and 1st column entry, etc. Example 5: Null Matrix
0 0 
Order of a Matrix – a matrix of m rows and n columns is said 0 0 
to be of order “m by n” or “m x n”. Here “x” is purely used to I = 0 0 0 J = 0 0 K=  
0 0 0 0 
denote the dimension of a matrix. (Note: Other symbols are p
x q, r x s, etc. The first letter stands for the number of rows,
while the second letter stands for number of columns.) 6. Diagonal Matrix – a square matrix whose non-diagonal
elements are all zero. We will use D to denote a diagonal
Rank of a Matrix – is the order of the largest non-zero matrix.
determinant that can be formed from the elements of a given Example 6: Diagonal Matrix
matrix. This will be discussed in matrix operations.
1 0 0 
Trace of a Matrix – is the sum of the diagonal elements in a 1 0
D=   D = 0 9 
0 
square matrix. 0 3  0 0  4
Types of Matrices:
Note: A diagonal matrix may have 0 as its diagonal
1. Row Matrix – a matrix of order 1 x n (i.e., only one row element(s).
and two or more columns). This is also called row vector (to
be taken up in our next topics). 7. Identity Matrix – a diagonal matrix whose diagonal
elements are 1. This is equivalent to the identity number 1 in
Example 1: Row Matrix scalar concept and is denoted by I. This matrix is also called
A = 2 0  3 B = 1  4 7 0 3 unit matrix.
Example 7: Identity Matrix MATRIX MULTIPLICATION
1 0 0 
1 0
I=   I = 0 1 0 Matrix multiplication is completely different from
0 1  multiplying scalars. In the sooner, the two matrices to be
0 0 1 
multiplied (called the premultiplier matrix and postmultiplier
8. Symmetric Matrix – a square matrix having similar non- matrix) must be “conformable for multiplication” in order
diagonal elements in both rows corresponding columns, i.e., obtain a product matrix, while in the later, the said restriction
aij = aji. does not occur. In general, multiplying two matrices takes
the form of
Example 8: Symmetric Matrix
 1 3 2  AB=C Product Matrix (1)
1 2 
Q=   R =  3 0 7  Postmultiplier Matrix
2 0  2 7 4 
Premultiplier Matrix
9. Skew-symmetric or Antisymmetric Matrix – a square matrix
having similar non-diagonal elements in both rows The Conformability Rule:
corresponding columns, i.e., aij = –aji.
A and B above are conformable for multiplication if and
Example 9: Skew-symmetric Matrix only if the number of columns of the premultiplier matrix
1 3 2  A is equal to the number of rows of the postmultiplier
 1 2 
T =   3 0  7 
matrix B (otherwise, A and B cannot be multiplied!!!). The
S=  
2 0  product matrix C will have an order equal to the number of
 2 7 4 
rows of A and number of columns of B. In symbol, we have
10. Upper Triangular Matrix – a square matrix whose REMEMBER THIS!!!
elements below the diagonal elements are all zero (i.e., aij = 0
for i > j). (A)pxq (B)qxr = (C)pxr (2)
Example 10: Upper Triangular Matrix
1 3 2 
1 2
V = 0  1 
U= 
(r columns in B = r columns in C)
 7
0 3  0 0  4
(q columns in A = q rows in B)
(p rows in A = p rows in C)
11. Lower Triangular Matrix – a square matrix whose
elements above the diagonal elements are all zero (i.e., aij = 0 Illustration 11: Conformability of Product of Matrices
for i < j).
a. (A)2x4 (B)4x1 = (C)2x1
Example 11: Lower Triangular Matrix
b. (R)1x6 (S)6x1 = (T)1x1 (scalar)
1 0 0
1 0 
X =  3  7 0
c. (E)2x3 (F)2x3 = Not possible (Why?)
W=  
 2 3   2 7 4 d. (T)3x3 (U)3x3 = (V)3x3
e. (J)5x1 (K)1x5 = (L)5x5
12. Singular Matrix – a square matrix whose determinant is
equal to zero. A null matrix is also a singular matrix. (A f. (G)4x4 (H)1x4 = Not possible (Why?)
separate discussion for computing the determinant of
g. (A)5x1 (B)1x5 (C)5x3 = (D)5x3
matrices with higher order will follow.)
h. (A)1x4 (B)4x3 (C)3x1 = (D)1x1 (scalar)
Example 12: Singular Matrix
i. (E)5x1 (F)1x5 (G)2x2 = Not possible (Why?)
1 2 3 
 1 1
Y=   Z =  4 0  2 j. (V)2x3 (W)3x6 (X)6x10 (Y)10x3 = (Z)2x3
 3 3    3 2 5 
Illustration g is explained this way (there are 2 ways to do
13. Non-singular Matrix – a square matrix whose determinant this): According to M15, 3 or more matrices can be
is not equal to zero. Matrices P, M, R and V are examples of multiplied indirectly by grouping two matrices at a time, with
a non-singular matrix. Their determinants are, respectively, 1, their product matrix multiplied to the other matrix. ( Do not
–36, –97 and 4. We will come to this in our discussion with to alter the position of matrices since matrix multiplication is
determinants. not commutative!!!)
14. Coefficient Matrix – a matrix formed from the 1st Method: Multiply A and B first, then premultiply their
coefficients of the variables in a system of a linear equations product to C, thus
(constants not included). For example, matrix H may
represent the system of equations in 3 variables: [(A)5x1 (B)1x5](C)5x3 = (E)5x5(C)5x3 = (D)5x3
x + 2y – 2z = –3 2nd Method: Multiply B and C first, then postmultiply their
x – z = 0, and product to A, thus
5x + 7y + 4z = 2 (A)5x1[(B)1x5 (C)5x3] = (A)5x1(F)1x3 = (D)5x3
15. Augmented Matrix – a matrix formed from all the Illustrations h and j follows the same suit.
constants (i.e., both variable coefficients and numerical
constants) of a system of linear equations. For example,
matrix E represents the augmented matrix for the system of
equations described in Item No. 14 above.
The Shortcut Approach: placing their sum at the common address of the product
matrix C.”
g. (A)5x1 (B)1x5 (C)5x3 = (D)5x3
The elements of the product matrix C = [cij] may be
computed using:
q
cij =  aik bk j (3a)
j. (V)2x3(W)3x6 (X)6x10(Y)10x3 = (Z)2x3 k 1
= ai1b1j + ai2b2j + + ai3b3j. . . + aiqbqj (3b)
where:
RULE: Inner indices cancels out (being the same), outer i = 1, 2, …, p
indices is the order of the product matrix. j = 1, 2, …, r
k = dummy index
Let us now proceed to actual multiplication of matrices. But q = no. of columns in A and no. of rows in B
before proceeding, let us have first these two “warm-up” Now, lets apply Eq. (3) to Example 17 above.
problems:
Example 3 Matrix Multiplication using Eq. (3)

MATRIX MULTIPLICATION USING Since A is of order 2 x 2 and B is 2 x 3, this gives p = 2, q =2


THE LONG-HAND METHOD and r = 3. The product matrix C by the law of conformability
becomes a 2 x 3 matrix with i = 1, 2, and j = 1, 2, 3. That is,

Example 1: Multiplication of Simple Matrices  c11 c12 c13 


C= 
c23 
(4)
1  c21 c22
 
Given: A = 2 0 1 , B =   2 Find: AB and BA Defining now the elements of C using (3) and knowing that
 3 
 a11 a12  1  3
A=   =   and
Note that AB will result to a 1x1 matrix (scalar) since A is a21 a22  2 4 
1x3 and B is 3x1. On the other hand, BA will be a 3x3
matrix (WHY???).  b11 b12 b13  1  2 3 
B= 
b23 
=  
Solution: b21 b22 5 0  1
3
  We have:
AB = 2 0 1  5  = 2(3)  0(5)  1(4) = [10]
2
 4  c11 =  a1k bk1 = a11b11 + a12b21
k 1
3 3(2) 3(0) 3(1)  = (1)(1) + (–3)(5) = –14
   
BA =  5  2 0 1 = 5(2) 5(0) 5(1) 
2
 4  4(2) 4(0) 4(1) c12 =  a1k bk 2 = a11b12 + a12b22
k 1
 6 0 3 = (1)( –2) + (–3)(0) = –2
 
= 10 0 5 2
 8 0 4 c13 =  a1k bk 3 = a11b13 + a12b23
k 1
Can you now figure out the procedure for multiplying two = (1)(3) + (–3)( –1) = 6
matrices? Here’s another…
2
Example 2: Multiplication of Simple Matrices c21 =  a2k bk1 = a21b11 + a22b21
k 1
1  3 1  2 3  = (2)(1) + 4)(5) = 22
If A =   and B = 5 0  1
2 4    2
c22 =  a2k bk 2 = a21b12 + a22b22
AB will be a 2x3 matrix while BA is not defined (Why?). The k 1
product AB is computed as follows: = (2)( –2) + (4)(0) = –4
2
1  3 1  2 3  c23 =  a2k bk 3 = a21b13 + a22b23
C = AB =   
2 4  5 0  1 k 1
= (2)(3) + (4)( –1) = 2
(1)(1)  (3)(5) (1)( 2)  (3)(0) (1)(3)  (3)( 1)
=   Now, using (4), we have
 (2)(1)  (4)(5) (2)( 2)  (4)(0) (2)(3)  (4)( 1) 
 14  2 6
 14  2 6 C=   , which is similar to Example 17.
=    22  4 2
 22  4 2
At this point, you must have already developed a little
Now here goes the rule:
confidence in multiplying matrices. Consider a more
“To multiply two conformable matrices A = [aij] of order p x complicated example.
q and B = [bij] of order q x r, get the inner product of the row
elements of A and the corresponding column elements of B,
Example 4 Matrix Multiplication using Eq. (3) Hint: You can get the product of Item 2 in two ways: (a)
Multiply the 1st 2 matrices first, then premultiply their
3 2 0 1 product to the 3rd matrix, and (b) Multiply the last two
Find the product EF if E =  1 
0 4 2 and matrices first, then postmultiply their product to the first
 1  3 5 0 matrix. You must arrive to similar answers.

2 0 1 3 0
 
3 1  2  1 6 MATRIX MULTIPLICATION USING
F=  . Is FE possible?
4  4 0 5 1 MS EXCEL
 
1 0  5 2 3
MS Excel has a built-in function MMULT which can be used
Solution: in multiplying matrices.
Matrix E is 3 x 4 and F is 4 x 5, this gives p = 3, q = 4 and r = The procedure:
5. By conformability, the product matrix G = EF becomes a 3
x 5 matrix which means i = 1, 2, 3, and j = 1, 2, …, 5. (Note 1. Enter the elements of the two matrices in vacant (visible)
here also that the product FE is not possible!!!). Formulating cells.
G, we have
2. Highlight cells for the product matrix (this should be also
 g11 g12 g13 g14 g15  visible.) See to it that the highlighted product matrix has an
G =  g 21 g 22 g 23 g 24 g 25  order that obeys the “conformability rule”.
 g 31 g 32 g 33 g 34 g 35  3. Do the following:

Using (1) a. Type: = MMULT(

4 b. Highlight the premultiplier matrix


gij =  eik f kj = ei1f1j + ei2f2j + ei3f3j + ei4f4j c. Type: ,
k 1
c. Highlight the postmultiplier matrix
g11 = e11f11 + e12f21 + e13f31 + e14f41
e. Type: )
= (3)(2) + (2)(3) + (0)(4) + (1)(1) = 13
d. Press: Shift + Ctrl, Enter.
g14 = e11f14 + e12f24 + e13f34 + e14f44
4. Repeat Step 3 for three or more matrices to be multiplied.
= (3)(-3) + (2)(-1) + (0)(5) + (1)(2) = –9
g22 = e21f12 + e22f22 + e23f32 + e24f42
Example: Do Example 4 using MS Excel
= (-1)(0) + (0)(1) + (4)(-4) + (2)(0) = –16
g25 = e21f15 + e22f25 + e23f35 + e24f45
2 0 1 3 0
= (-1)(0) + (0)(6) + (4)(1) + (2)(3) = 10 3 2 0 1  
 2  1 6

E =  1 0 4 2 and
3 1
F=  .
g33 = e31f14 + e32f24 + e33f34 + e34f44 4  4 0 5 1
 1  3 5 0  
= (1)(1) + (-3)(-2) + (5)(0) + (0)(5) = 7 1 0  5 2 3
Note: You are required to derive the other entries. The
complete answer is
13 2 6 9 15 
G = 16  16  11 27 10 

13  23 7 25  13

You may now be very familiar with multiplying matrices


using Eq. (3), and find it quite time-consuming and prone to
error (especially in dealing with indices and signs). Your
professor, therefore, hereby suggests of an alternative
approach which you may find quite appealing to use due to
its simplicity. Here is it…
RULE: “Perform the row times column multiplication on the
2 matrices, placing their inner product in the row/column
address being considered.”
TRY THIS!!! Find the product:
 2 3 1
  Explanation:
4 0 5 3 2 2 2
 
1.  4  1 0  0 0  4 3 Step 1: Matrix A is entered in cells A3:D5 while Matrix B,
 
0 2 1  1  3 7 0  F3:G6
3 5 6
 Step 2: The product matrix should be of order 3 x 5 to follow
the conformability rule. Cells B9:F11 is chosen (highlighted).
3 5 2
  Step 3: Type: =MMULT(A3:D5, F3:G6)
 2 1 0 1 
2 3 0 1 2   
2.   5 0 1  0  Press: Shift + Ctrl, Enter.
0 1 5 3 0   
  2 
 0 1 2
 4 3 0

DETERMINANTS 1 2 3 4 Elements

Determinant is defined as a scalar-valued function whose


0 1 2 1 Row
|D| =
domain is a set of square matrices. Simply put, a determinant 2 5 0 2 Secondary diagonal
is merely a scalar value of a square matrix. (Rectangular
matrix has no determinant!). Thus, for a square matrix A 1 0 1 3 Main diagonal
given below Column
 a11 a12 a13  a1n 
  3. Minor of a Determinant |Mij| is a determinant of order (n –
a 21 a 22 a 23  a 2n 
1) obtained from deleting row and column from the
A=  a 31 a 32 a 33  a 3n  (6) determinant (or matrix) of order n. The subscript i stands for
 
       the location of row deleted, and j, the column deleted.
a  a nn 
 n1 a 11 a11
Example 24: Getting the Minor from a Determinant
Its determinant is given by 1 2 3 4
a11 a12 a13  a1n 0 1 2 1
Given: A = , Find |M11|, |M23|, |M32| and |M44|.
a 21 a 22 a 23  a 2n 2 5 0 2
|A| = det A = a 31 a 32 a 33  a 3n = scalar 1 0 1 3
     Solution: |M11| is obtained by deleting row 1 and column 1,
a n1 a11 a11  a nn |M23| by deleting row 2 and column 3,, |M32| by deleting row 3
and column 2, and |M44| by deleting row 4 and column 4.
Note of the difference of symbols used: “[ ]” for matrix and “|
|” determinants. 1 2 3 4
1 2 1
Illustration 25: The Determinant of a Square Matrix 0 1 2 1
a. , |M11| = 5 0 2
2 5 0 2
a. If A = [3], then |A| = 3. 0 1 3
1 0 1 3
 2 0 2 0
b. If B =   , then |B| = = –2.
  2  1  2 1 1 2 3 4
1 2 4
0 1 2 1
 2 3 5 2 3 5 b. , | M23| = 2 5 2
  2 5 0 2
c. If C =  1 1 2 , then |C| =  1 1 2 = 0. 1 0 3
 4 1 1  4 1 1 1 0 1 3

1 2 3 4 1 2 3 4 1 2 3 4
 
1 3 4
0 1 2 1 0 1 2 1 0 1 2 1
d. If D =  , then |D| = = 6. c. , | M32| = 0 2 1
2 2 0 2 2 2 0 2 2 5 0 2
  1 1 3
1 0 1 3 1 0 1 3 1 0 1 3
Observe that the reduced values of determinant as seen from 1 2 3 4
the matrices above are scalars, i.e., ordinary numbers. (The 1 2 3
0 1 2 1
procedure of getting the determinant of a matrix will be d. , | M44| = 0 1 2
discussed in detail in the succeeding topics.) Recall also that 2 5 0 2
2 5 0
we have previously classified square matrices in terms of 1 0 1 3
values of their determinants: singular matrices with zero
determinants, and non-singular matrices with non-zero Important: Do not change the arrangement of elements. Can
determinants (see Definitions 12 and 13). Based on these you derive the other minors of A?
definitions, matrix C above is a singular matrix, while
5. Pivot Element – in getting the minor Mij, the element
matrices B and C are nonsingular matrices. The importance located at ith row and jth column (or the element at the
of determinants will be more appreciated when we go to their intersection of the two lines) is the pivot element. For
applications. In the meantime, our task now is “how to get instance, in Example 24 above, 1 is the pivot element for M11;
their value”. Before we do this, let us first go into some 2 for M23; 5 for M32; and 3 for M44.
preliminaries by familiarizing some terms, concepts and
definitions. 6. Cofactor of a Determinant Cjk – is defined by the formula:

A. Preliminaries |Cij| = (–1)(i + j) |Mij| (7)

1. Order of a Determinant – is the order of the square matrix where i and j are the row and column locations, respectively,
wherefrom the determinant is taken. For instance in and Mij is the minor of the determinant defined in Item 3.
Illustration 25 above, |A| is of order 1, |B| order 2, |C| order 3 Example 25: Getting the Cofactor of a Determinant
and |D| order 4.
1 2 3 4
2. The elements, rows, columns and diagonals of a
0 1 2 1
determinant are also the elements, rows, columns and Given: |A| = , Find the cofactors of |A|.
diagonals of the corresponding matrix. 2 5 0 2
1 0 1 3
Illustration 26: Description of Determinant
Solution: Using (7) [Do not ask, at this point, how the values
of the determinants were derived. We will go to this in the
next section.]
1 2 1 0 2 1 DETERMINATION OF DETERMINANTS BY
|C11| = (+1) 5 0 2 = –27 |C12| = (–1) 2 0 2 = 6 LONG HAND METHOD
0 1 3 1 1 3
1. Second Order Determinants
0 1 1 0 1 2 Second order determinants are simply evaluated by diagonal
|C13| = (+1) 2 5 2 = –9 |C14| = (–1) 2 5 0 = 12 multiplication method as shown below.
1 0 3 1 0 1 –
a b
2 3 4 1 3 4 |A| = = ad – cb.
|C21| = (–1) 5 0 2 = 29 |C22| = (+1) 2 0 2 = –6
c d
0 1 3 +
1 1 3
Example 1: Determinant of a 2nd Order Matrix
1 2 4 1 2 3
|C23| = (–1) 2 5 2 = 13 |C24| = (+1) 2 5 0 = –14 3 6
a. Given: A =   . Find |A|
1 0 3 1 0 1  2  4

Following similar procedure, 3 6


Solution: |A| = = 3(–4) – (–2)(6) = 0
|C31| = 5 |C32| = 0 |C33| = 1 |C34| = –2 2 4

|C41| = 23 |C42| = –6 |C43| = 7 |C44| = –8   5  2


b. a. Given: B =   . Find |B|
7. Cofactor Matrix (designated herewith as Cof A or A ] – is a c
 3 1 
matrix whose elements are cofactors of the corresponding
determinant, i.e., its elements are formulated using (7). 5 2
Solution: |B| = = –5(1) – (–3)( –2) = –11
3 1
Example 26: The Cofactor Matrix
1 2 3 4 2. Third Order Determinants
  Method 1: By Diagonal Multiplication
0 1 2 1
Given: A =  , find Ac.
2 5 0 2
  a b c
1 Given: A =  d e 
0 1 3
f
 g h i 
 C11 C12 C13 C14 
 
Solution: Ac =  21
C C 22 C 23 C 24  Procedure:
C C 32 C 33 C 34  1. Write the augmented elements (i.e., the first 2 columns elements of the of
 31 
 C 41 C 42 C 43 C 44  the matrix are repeated) as shown below.

a b c a b
and from Example 27, its elements are
|A|= d e f d e
27 6 9 12  g h i g h
 
29  6 13  14
Ac =  2. Perform the diagonal multiplication, affixing “+” sign to each term for
 5 0 1 2
  down-right multiplication and “–“ sign for up-right multiplication as shown
 23  6 7  8  below.
– – –
7. Adjoint of a Matrix (Adj) is merely the transpose of the
a b c a b
cofactor matrix. Thus
|A|= d e f d e
Adj A = [Ac]T = (Cof A)T (8)
g h i g h
Illustration 1: Adjoint of a Matrix
+ + +
From Example 27, the Adjoint of A is
|A|= aei + bfg + cdh – gec – hfa – idb
T
 27 6  9 12 
  Example 2: Determinant by Diagonal Multiplication
29  6 13  14
Adj A =  2 3 5
 5 0 1 2 2 3 5

 23  6 7

 8  Given: C =  1 1 2 , find |C| =  1 1 2 = 0.
 4 1 1  4 1 1
27 29 5 23 
  Solution:
6  6 0  6
=  – – –
  9 13 1 7
  2 3 5 2 3
 12  14  2  8
|C|=  1 1 2  1 1
We will now go to the evaluation of determinants. Here we
4 1 1 4 1
will just consider the 2nd up to 4th order determinants, as
determination of 5th order and above is already impractical + + +
for hand calculations. On your request, you will, however, be
|C| = (2)(1)(1) + (3)(2)(4) + (5)(–1)(1) – (4)(1)(5)
taught how to get determinants of higher order using
applicable softwares, such as Matcad, MATLAB, and MS – (1)(2)(2) – (1)(–1)(3)
Excel.
= 2 + 24 – 5 – 20 – 4 + 3 = 0.
Now, try this!!! d. And, finally, using the 3rd column as reference line.
1 2 2 5 2 1 For column 3, i = 1,2,3, , j = 3 (fixed), and checkerboard
a. 1  2 0 = –2 b. 0  1 2 = 5 pattern is shown in (D10) is also +, –, +. Using, again, (9b)
3 1 4 3 1 0 |A| = + a13|M13| – a23|M23| + a33|M33|

Method 2: By Cofactor Method 0 1 5 2 5 2


|A|= +(1) – (2) + (0)
The cofactor method uses the formula 3 1 3 1 0 1
n = 1[(0 – (–3)] – 2(5 – 6) + 0 = 3 + 2 + 0 = 5
|A| =  aij Cij (8)
j 1 TRY THIS: How about using row 3 and column 2 as
reference lines?
or in terms of (7), if a row is considered as reference line:
Note: You can use any reference line, but do not forget to
n
i j strictly follow the checkerboard pattern D10. Also, in the
|A| =  (1) aij M ij , j = 1, 2, 3. (9a)
formulation of the sub-determinants, do not interchange the
j 1
arrangement of the elements, nor omit any. Row arrangement
and if a column is considered as reference line is from left to right, while column arrangement is from top to
n
bottom. As an advice, choose a row or column that has the
|A| =  (1) i  j aij M ij , i = 1, 2, 3. (9b) most number of zero elements in order to simplify
i 1 calculations by reduction on the number of sub-determinants
involved. Let us consider the next example.
In using (9), we will fit in the factor (– 1)i + j into the
determinant to give us easy reference in using (9). This is Example 4: 3rd Order Determinant by Cofactor Method
called a “checkerboard pattern”
1 2 4
   Evaluate: |A| = 0 1 3
   (D10) 2 0 0
  
By inspection, the 3rd row has the most number of zero2.
Let’s now have some examples. Using (9a) and (D10), we have
Example 3: 3rd Order Determinant by Cofactor Method 2 4
|A|= +(2) – 0* + 0* = 2(6 – 4) = 4.
5 2 1 1 3
Evaluate: |A| = 0  1 2 *From now on, if the reference element is zero, never mind
3 1 0 writing the sub-matrices since the result will just simplify to
0.
We will solve the problem in 4 different methods. In each
method, and you will find out that each leads to a single At this point, I am now presuming that you are already very
result. It’s up to you, therefore, to adopt the method which is familiar with the evaluation of a 2nd order determinant. This
the easiest for you. Here we go… will be your basic tool in evaluating higher-ordered
determinants by cofactor method.
a. Consider the 1st row as reference line.
3. Fourth Order Determinants
For row 1, i = 1 (fixed), j = 1, 2, 3, and checkerboard pattern
is shown in (D10) is +, –, +. Using (9a) The diagonal multiplication does not anymore apply to 4 th
order determinants, therefore, we will use the cofactor
|A| = + a11|M11| – a12|M12| + a13|M13| method (and the Gaussian Elimination later on). Similar
procedure and technique with the 3rd order determinant
1 2 0 2 0 1 applies. The corresponding equations and checkerboard
|A|= +(5) – (2) + (1)
1 0 3 0 3 1 pattern are:
= 5(0 – 2) – 2(0 – 6) + 1[0 – (–3)] = –10 + 12 + 3 = 5. If a row is considered as reference line:
nd n
b. Consider the 2 row as reference line.
|A| =  (1) i  j aij M ij , j = 1, 2, 3, 4. (11a)
For row 2, i = 2 (fixed), j = 1, 2, 3, and checkerboard pattern j 1
is shown in (D10) is –,+, –. Using (9a) again
If a column is considered as reference line:
|A| = + a21|M21| – a22|M22| + a23|M23|
n
2 1 5 1 5 2 |A| =  (1) i  j aij M ij , i = 1, 2, 3, 4. (11b)
|A|= –(0) + (–1) – (2) i 1
1 0 3 0 3 1
And the checkerboard pattern is:
= 0 – 1(0 – 3) – 2(5 – 6) = 0 + 3 + 2 = 5.
   
c. Using the 1st column as reference line.    
(D12)
For column 1, i = 1,2,3, , j = 1 (fixed), and checkerboard    
pattern is shown in (D10) is +, –, +. Using (9b)    

|A| = + a11|M11| – a21|M21| + a31|M31| Example 5: 4th Order Determinant by Cofactor Method
1 2 2 1 2 1 2 2 5 1
|A|= +(5) – (0) + (3)
1 0 1 0 1 2 0 3 2 3
Evaluate: |A| =
3 0 0 4
= 5(0 – 2) – 0 + 3[(4 – (–1)] = –10 + 0 + 15 = 5
1 0 1 3
By inspection from the above determinant, row 3 and column 5 1 2 5
2 have two zeroes, while rows 2 and 4, and columns 1 and 3 |A1| = – (3) + 0 – (–4) = 14
1 3 1 1
have 1. For the sake of comparison, we will solve the
problem using rows 1, 2 and 3, and columns 2 and 3 as 3 4
reference lines. The rest are left as warm-up problems. |A2| = – (–2) + 0 – 0 = 10
1 3
a. Using the 1st row as reference line (with 11a and D12):
3 0
For row 1, i = 1 (fixed), j = 1, 2, 3,4, and the checkerboard |A3| = – (–2) + 0 – 0 = –6
pattern is shown in (D12) is +, –, +, –. Using (11a) 1 1
|A| = + a11|M11| – a12|M12| + a13|M13| – a14|M14| Finally, substituting the above values to (E27b) gives
3 2 3 0 2 3 |A| = 3(14) – 2(10) + 3(–6) = 4.
|A|= + (2) 0 0  4 – (–2) 3 0  4 c. Using the 3rd row as reference line:
0 1 3 1 1 3
2 5 1 2 2 5
|A1| |A2| |A| = + (3) 3 2 3 – 0 + 0 – (–4) 0 3 2 (E27c)
0 3 3 0 3 2 0 1 3 1 0 1
+ (–5) 3 0  4 – (1) 3 0 0 (E27a)
|A1| |A2|
1 0 3 1 0 1
Where: (Again which reference lines did I use?)
|A3| |A4|
2 1 2 5
Note that the original 4 x 4 determinant was reduced to 3 x 3 |A1| = + (0) – (–1) + (3) = 24
(and, later on, to 2 x 2). We will not anymore go into the 3 3 3 2
details of their evaluation, but give more emphasis on their
expansion technique. That is, using rows and columns with 2 5 2 2
|A2| = + (–1) – (0) + (–1) = –17
most zeroes as the reference line. For instance, in A1, we will 3 2 0 3
use column 1 (you can check using row2); for A2, row 1; and
for A3 and A4, column 2. We have Substituting the above values to (E27c) gives
|A| = 3(24) + 4(–17) = 4
3 2 3
0 4
|A1| = 0 0  4 = (3) – 0 + 0 = –12 d. Finally, using column 2 as reference line:
1 3
0 1 3
0 2 3 2 5 1
0 2 3 |A| = – (–2) 3 0  4 + (3) 3 0 4 –0+0
3 4 3 0
|A2| = 3 0  4 = 0 –2 +3 = –19 1 1 3 1 1 3
1 3 1 1 E27d
1 1 3
|A1| |A2|
0 3 3 Where:
3 4
|A3| = 3 0  4 = –3 + 0 – 0 = –15
1 3 3 4 3 0
1 0 3 |A1| = + (0) – (2) + (3) = –19
1 3 1 1
0 3 2
3 0 5 1 2 5
|A4| = 3 0 0 = –3 +0–0=9 |A2| = – (3) + (0) – (–4) = 14
1 1 1 3 1 1
1 0 1

Substituting the above values to (E27a) gives Substituting the above values to (E27d) gives

|A| = +(2)(–12) – (–2)(–19) + (–5)(–15) – (1)(9) = 4. |A| = 2(–19) + 3(14) = 4.

In the succeeding presentation of solutions, I will now be Clearly, the 4 methods employed above yielded the same
very concise to the point of not anymore presenting the answer. It’s now up to you to decide on which method to
formula and the checkerboard pattern. You will, therefore, use. In the meantime, please take these warm-up problems
answer the questions “Why?” and “How” by yourself!!! (But and try deriving their answers.
don’t worry, I’m still there for your rescue in case of queries.) 1 2 0 0 5 2 3 1
b. Using the 2nd row as reference line. 2 0 4 4 1 3 0 0
a. |A| = = –4 b. |B| = =0
2 0 5 3 2 1 0 7
2 5 1 2 2 1
0 0 1 2 1 0 1 3
|A| = – (0) + (3) 3 0  4 – (2) 3 0 4
1 1 3 1 0 3 4. 5th and Higher Order Determinants
Fifth and higher order determinants are evaluated similar to
|A1| |A2|
3rd and 4th orders wherein the sub-determinants are reduced to
2 2 5 2nd order by cofactor method. The procedure, though, will be
quite lengthy as, for instance, a 5th order determinant, will be
+ (3) 3 0 0 (E27b)
successively reduced first to 4th order, then to 3rd order, and,
1 0 1 finally 2nd order where the final answer is obtained. For this
reason, it is best for you to use computer softwares, such as
|A3| Matcad, MATLAB or MS Excel. This will be taught to you
Evaluating further the sub-determinants above (Can you by your professor on your request. In the meantime, for a 5 th
guess what reference lines did I use?): order determinant, the corresponding equations and
checkerboard pattern are:
If a row is considered as reference line: 1 3 4 1
n 2 3 2 1
+ (2) –0 (E28c)
|A| =  (1) i  j aij M ij , j = 1, 2,…, 5. (12a) 0 2 0 0
j 1
2 1 0 1
if a column is considered as reference line:
|A5|
n
i j
|A| =  (1) aij M ij , i = 1, 2,…, 5. (12b) where:
i 1
2 2 1
The corresponding checkerboard pattern is: |A4| = – 0 + (2)  1  2 3 – 0 + 0 (E28d)
     2 0 1
    
|A6|
     (D13)
     1 4 1
     |A5| = + 0 – (2) 2 2 1 + 0 – 0 (E28e)
2 0 1
Example 6: 5th Order Determinant by Cofactor Method
|A7|
1 2 3 4 1
2 0 3 2 1 Reducing further |A6| and |A7|:
Evaluate: |A| = 0 0 2 0 0 2 1 2 2
1 2 0 2 3 |A6| = + (–2) – (0) + (1) = –18 (E28f)
2 3 1  2
2 0 1 0 1
4 1 1 4
By inspection on the above determinant, row 3 has four zeros |A7| = + (–2) – (0) + (1) = –18 (E28g)
and column 2 has 3. We will use both as our reference lines 2 1 2 2
(the rest will be left as your warm-up problem). Substituting (E28f) and (E28g) to (E28d) and (E28e),
a. Using the 3rd row as reference line: respectively gives |A4| = –36 and |A5| = 36. And, again,
substituting these values to (E28c) gives |A| = 0, which is
1  2 4 1 similar to Item a in this example.
2 0 2 1
|A|= + 0 – 0 + (2) –0+0 (E28a)
1 2  2 3
2 0 0 1
DETERMINATION OF DETERMINANTS
USING MS EXCEL
|A1|
MS Excel has a built-in function MDETERM which can be
|A1| will next be reduced into a 3rd order sub-determinants, used determine the determinant of matrices.
thus (using the 4th row as our reference line):
The procedure:
2 4 1 1 2 4
1. Enter the elements of the square matrix in vacant (visible)
|A1| = – (–2) 0 2 1 + 0 – 0 + (1) 2 0 2 cells.
2 2 3 1 2 2 2. Highlight a single cell (also visible) where the determinant
is to be placed.
|A2| |A3| 3. Do the following:
E28b a. Type: = MDETERM(
where:
b. Highlight the matrix
 2 1 2 4
|A2| = – (0) + (2) – (1) = –4 e. Type: )
2 3 2 2
d. Press: Shift + Ctrl, Enter.
2 4 1 2 Example 7: Do Example 6 using MS Excel
|A3| = – (2) + 0 – (2) =8
2 2 1 2

Substituting the above values to (E28b) gives


|A1| = 2(–4) + 1(8) = 0
And, finally, using E28a with |A1| = 0, we have
|A|= + 0 – 0 + (2)(0) – 0 + 0 = 0
b. Using the 2nd column as reference line:
2 3 2 1
0 2 0 0
|A|= – (–2) +0–0
1 0 2 3 Explanation:
2 1 0 1 Step 1: Enter element in A3:E7
Step 2: Go to G5
|A4| Step 3: Type: = MDETERM(A3:E7)
Press: Shift + Ctrl, Enter
MATRIX INVERSION Example 2: Inverse of a 4th order matrix
 2 2 5 1 
When a square matrix A is non-singular (i.e., its determinant  
0 3 2 3
is not zero), it has a unique inverse A–1 such that If B =  , find B-1
 3 0 0  4
 
AA–1 = A–1A = I (13)  1 0  1 3 

Where I is an identity matrix or a square matrix with diagonal From Example 27, |B| = 4. Solving for the cofactor matrix:
elements equal to 1.
 c
B11  B12
c
 B13
c c 
 B14
Illustration 1: Inverse of a Matrix  
 c
B21  B22
c
 B23
c c 
 B24
 2 1 3  1 2 1
Cof B =  
If A = 1 0 1 , then A-1 =  1  4 1 
1 (E30-1)
c 
  B32  B33  B34 
c c c
2 B31
 2 1 1  1 0  1  c 
  B42  B43  B44
c c c
B41 
1 1 3 4 0 3 1 9
1  3 2 2 0 2 1 7 Defining the elements of (E30-1): (How about deriving the
If B = , then B-1 =
2 0 3 3 1 2 2  8 answers with your friends…)
0 1 1 1 1 1 1 2 3 2 3 0 2 3
c c
Note: You are advised to verify (13) using each pair of B11 = 0 0  4 = –12 B12 = 3 0  4 = –19
matrices above. 0 1 3 1 1 3

We will now go to the procedure of getting the inverse of a 0 3 3 0 3 2


matrix. We will study two methods: by Adjoint Method and c
0  4 = –15 c
B13 = 3 B14 = 3 0 0 =9
by Gaussian Elimination Method.
1 0 3 1 0 1
1. Matrix Inversion by Adjoint Method.
2 5 1 2 5 1
One application of determinant is getting the inverse of a c c
matrix by Adjoint Method. The formula is: B21 = 0 0  4 = –8 B22 = 3 0  4 = 14
0 1 3 1 1 3
Adj A 1
A–1 = = (Adj A) (14)
A A 2 2 1 2  2 5
c c
B23 = 3 0  4 = 10 B24 = 3 0 0 = –6
where the Adj A was previously defined as the transpose of
1 0 3 1 0 1
the cofactor matrix, and the cofactor matrix as a matrix
whose element are cofactors of the corresponding
2 5 1 2 5 1
determinant. c c
B31 = 3 2 3 = 24 B32 = 0 2 3 = 35
Example 1: Inverse of a 3rd order matrix 0 1 3 1 1 3
 2 1 3
2 2 1   2 5
Given: A = 1 0 1 , find A-1
2

 2 1 1
c
B33 =  0 
3 3 = 27 c
B34 = 0 3 2 = –17
  1 0 3 1 0 1
Solution:
2 5 1 2 5 1
The determinant of A is (using the 2nd row as reference line): c
B41 = 3 2 3 = –44 c
B42 = 0 2 3 = –67
1 3 2 1 0 0 4 3 0 4
|A|= – (1) + (0) – (1) =2
1 1 2 1
2 2 1 2 2 5
c c
And the cofactor matrix of A is given by (using (7) in its B43 = 0 3 3 = –51 B44 = 0 3 2 = 33
elements): 3 0 4 3 0 0

Plugging in values to (E30-1)


 0 1 1 1 1 0 12 19 15 9 
     
 1 1 2 1 2 1
 1 1 1 8 14  10  6
 1 1 Cof B = 
3 2 3 2    24  35 27 17 
Cof A =      =  2  4 0  
 1 1 2 1 2 1
 1 1  1  44  67 51 33 
 1 3 2 3 2 1
   
 0 1 1 1 1 0  and getting its transpose

T
 12 8 24 44 
 1 1 1  1 2 1  
19 14  35  67
Then, Adj A =  2  4 0  =  1  4 1  Adj B = 
 15  10 27 51 
 1 1  1  1 0  1  
  9  6 17 33 
And the inverse is And finally, using (14)
 1 2 1  12 8 24 44 
= =  1 
Adj A 1
A–1 = 4 1  1  19 14  35  67
A 2 B-1 =
 1 0  1 4  15  10 27 51 
 
  9 6 17 33 
Check (Your turn!!!): 2 1 3 1 0 0   Row 1
 
 2 2 5 1   12 8 24 44  1 0 1 0 1 0   Row 2
    2 1 1
 0 3 2 3 1
  19 14  35  67
 0 0 1   Row 3
 3 0 0  4 4  15  10 27 51 
    Step 2. Performing the EROMs to arrive at [I|A-1]
 1 0  1 3    9  6 17 33 
First, we will transform C1 into 1 0 0 elements. The series
1 0 0 0 of procedures are:
 
= 0 1 0 0
a. R1  R2; Copy R3
0 0 1 0
 
0 0 0 1 1 0 1 0 1 0   Row 1
 
2 1 3 1 0 0   Row 2
Now, here’s another bonus problem:
2 1 1 0 0 1   Row 3
Find the inverse: 
b. Copy R1; R2 + R1*(– 2)  R2; Copy R3
1 0 1 3 1
  1 0 1 0 1 0 
0 1 1 0 0  Row 1
A = 2 2
 

0 2 5
  0 1 1 1 2 0   Row 2
1 0 1 3 1 2 1 1 0 0 1   Row 3
0  
 1 2 0 1 
c. Copy R1; Copy R2; R1*(– 2) + R3  R3
We will now proceed to another method of matrix inversion
(which you might find more appealing!). This involves three  1 0 1 0 1 0   Row 1
 
elementary row operations for matrices (EROM):  0 1 1 1  2 0   Row 2
 0 1  1 0  2 1   Row 3
EROM 1: Interchanging two rows.  
EROM 2: Multiplying a row by a non-zero number. C1 is OK! Our next task is to transform C2 into 0 1 0
EROM 3: Adding a number times one row to another elements (which is almost there!!!).
row. d. Copy R1; Copy R2; R2 + R3*(– 1)  R3
EROM 4: Combination of the three. 1 0 1 
0 1 0  Row 1
 
0 1 1 1 2 0   Row 2
2. Matrix Inversion by Gauss-Jordan Method. 0 0 2 1 0 1   Row 3
 
The Gauss-Jordan Method (G-JM) utilizes the above three
elementary row operations for matrices in order to transform C2 is now OK. Lastly, we will transform R3 into 0 0 1.
the augmented matrix [A|I] into [I|A-1], that is e. R1 + R3(–½)  R1; R2 + R3(–½)  R2; R3(½)  R3

[A|I]  [I|A ] -1
(15) 1 0 0 1 2 1 12 
 
The procedure is as follows: 0 1 0 1 2 2 1 2 
0 0 1 12 0 1 2 
1. Formulate the augmented matrix [A|I].  
2. Transform the augmented matrix into [I|A-1] using the 4
EROMs, whichever is applicable. The augmented matrix in Step 2e is now in the form of [I|A-1].
3. Formulate A-1 from [I|A-1]. Step 3. Formulate A-1 from Step 2e:
Suggested Technique for Step 2:
 1 2 1 12  1 2 1
“Transform each column of the given matrix A into -1 1 2 2 1 2   1 4 1 
A =   =½  
corresponding column of an identity matrix I, operating from
 1 2 0  1 2  1 0  1
left to right.”
We will illustrate the procedure and technique using which is also the result of Example 29.
Examples 29 and 30 above. But before we proceed, please Example 4: Inverse of a 4th order matrix
take cognizance of the following symbols:
 2 2 5 1 
R/C = stands for row/column  
0 3 2 3
* = multiplication symbol (read as “times”) If B =  , find B-1
 = interchange symbol (read as “interchanged with”)  3 0 0  4
 
 = result locator (read as “placing the result in”)  1 0  1 3 
Here we go… Note: I will now present the solution concisely. You are,
rd
Example 3: Inverse of a 3 order matrix by G-JE Method therefore advised to perform each row operation in order to
develop confidence on the whole procedure.
 2 1 3
Step 1. The augmented matrix [A|I] is
Given: A = 1 0 1 , find A-1.
 2 1 1  2 2 5 1 1 0 0 0   Row 1
 
 0 3 2 3 0 1 0 0   Row 2
Solution:
 3 0 0 4 0 0 1 0   Row 3
Step 1. Formulate the augmented matrix [A|I].  
  1 0  1 3 0 0 0 1   Row 4
Step 2. Perform the EROMs to arrive at [I|A-1] Solution:
Transform C1 into 1 0 0 0 elements: The augmented matrix is:
a. R1  R4*(– 1); Copy R2; Copy R3 0 0 2 2 3 1 0 0 0 0  Row 1
 
1 0 1 3 0 0 0 1   Row 1 3 1 1 1 0 0 1 0 0 0  Row 2
  2
 0 3 2 3 0 1 0 0   Row 2 0 2 2 2 0 0 1 0 0  Row 3
 
3 0 0 4 0 0 1 0   Row 3 1 1 0 3 1 0 0 0 1 0  Row 4
  0
 2  2  5 1 1 0 0 0   Row 4  1 0 5 2 0 0 0 0 1   Row 5

b. Copy R1; Copy R2; R1*(– 3) + R3  R3; R1*(– 2) + R4  R4 First we need to interchange some rows. By looking closely
at the leading elements of the matrix, R4 ought to be moved
1 0 1 3 0 0 0 1   Row 1
  to R1, R5 (with one zero) should be in R2, and R1 (with 2
 0 3 2 3 0 1 0 0   Row 2 zeroes) to R3. Rows 2 and 3 should be transferred to the last
 0 0 3 5 0 0 1 3   Row 3 two rows. Although this procedure is not mandatory, the
  same is necessary in order to shorten and, more or less,
 0  2  7 7 1 0 0 2   Row 4
simplify the whole process. (You may wish to have a
C1 is OK. Next, transform C2 into 0 1 0 0 elements. different approach!!!)

c. Copy R1; R2*(1/3); Copy R3; R2*(2) + R4*(3)  R4 1 1 0 3 1 0 0 0 1 0  Row 1


 
1 0 1 3 0 0 0 1   Row 1 0 1 0 5 2 0 0 0 0 1  Row 2
  0 0 2 2 3 1 0 0 0 0  Row 3
0 1 2/3 1 0 1/ 3 0 0   Row 2  
0 0 3 5 0 0 1 3   Row 3 2 0 2 2 2 0 0 1 0 0  Row 4
  3 1 1 1 0 0 1 0 0 0   Row 5
 0 0  17 27 3 2 0 6   Row 4 

C2 is also OK. Next, we move to C3 (0 0 1 0 elements) Now, we will get rid of C1, transform into 1 0 0 0 0.

d. R3*(1/3) + R1  R1; R3*(2/9) + R2  R2; R3*(–1/ 3)  R3; Copy R1, R2 and R3; R1*(–2 ) + R4  R4; R1*(–3 ) + R5  R5
R3*(– 17) + R4*(3)  R4
1 1 0 3 1 0 0 0 1 0  Row 1
1 0 0  4/3   Row 1  
0 0 1/ 3 0
0 1 0 5 2 0 0 0 0 1  Row 2
 
0 1 0 19 / 9 0 1/ 3 2 / 9 2 / 3   Row 2 0 0 2 2 3 1 0 0 0 0  Row 3
0   
0 1 5/3 0 0 1/ 3 1  Row 3  0  2 2  4 0 0 0 1 2 0  Row 4
 
 0 0 0 4 9 6  17  33   Row 4  0  2 1 8 3 0 1 0 3 0   Row 5

With C3 OK, we will now operate on C4 (0 0 0 1). Next, transform C2 into (0 1 0 0 0) elements.
e. R1 + R4*(–1/3)  R1; R2 + R4*(19/36)  R2; R1 + R2*(–1 )  R 1; Copy R2 and R3; R2*(–2 ) + R4  R4;
R3* + R4(–5/12)  R3; R4*(– 1/4)  R4 R2*(–2 ) + R5  R5

1 0 0 0 3 2 6 11  1 0 0  2 1 0 0 0 1  1   Row 1
   
0 1 0 0 19 / 4 7 / 2  35 / 4  67 / 4  1   Row 2
0 1 0 5 2 0 0 0 0
0 0 1 0  15 / 4  5 / 2 27 / 4 51 / 4  0 0 2 2 3 1 0 0 0 0   Row 3
   
 0 0 0 1 9/4  3/ 2 17 / 4 33 / 4  0 0 2 6 4 0 0 1  2 2   Row 4
0 0 1 2 1 0 1 0  3 2   Row 5
The augmented matrix in Step 2e is now in the form of [I|A-1]. 
Step 3. Formulate A-1 from Step 2e: Next, transform C3 into 0 0 1 0 0 elements.
 3 2 6 11  a. R1  R4
 
19 / 4 7 / 2  35 / 4  67 / 4
B-1 =  1 0 0  2 1 0 0 0 1  1   Row 1
 15 / 4  5 / 2 27 / 4 51 / 4   
  0 1 0 5 2 0 0 0 0 1   Row 2
  9 / 4  3 / 2 17 / 4 33 / 4 
0 0 1 2 1 0 1 0  3 2   Row 3
 
 12 8 24 44  0 0 2 6 4 0 0 1  2 2   Row 4
1  19 14  35  67

0 0 2 2 3 1 0 0 0 0   Row 5
B-1 = 
4  15  10 27 51 
  b. Copy R1, R2 and R3; R4 + R5  R4; R3*(2) + R5  R5
  9  6 17 33 

which is also the result of Example 30. 1 0 0  2 1 0 0 0 1 1   Row 1


 
0 1 0 5 2 0 0 0 0 1   Row 2
And now, on to our last example, a 5 x 5 matrix. 0 0 1 2 1 0 1 0 3 2   Row 3
Example 5: Inverse of a 5th order matrix by G-J Method  
0 0 0 8 7 1 0 1 2 2   Row 4
0 0 2 2 3 0 0 0 6 5 1 2 0  6 4   Row 5
 

3 1 1 1 0
Given: A = 2 0 2 2 2 , find its inverse.
 
1 1 0 3 1
0 2
 1 0 5
Next, transform C4 into 0 0 0 1 0 elements.
R4*(1/4) + R1  R 1; R4*(–5/8) + R2  R2; R4*(–1/4) + R3  R3; SOLUTION OF SYSTEM OF LINEAR
R4*(1/8)  R4; R4*(3) + R5*(–4)  R5
ALGEBRAIC EQUATIONS
1 0 0 0 3/ 4 1/ 4 0 1/ 4 1 / 2  1 / 2   Row 1
 
0 1 0 0  19 / 8  5 / 8 0  5 / 8 5 / 4  1 / 4   Row 2
0 Given the System of Linear Algebraic Equations
0 1 0  3/ 4  1 / 4 1  1 / 4  5 / 2 3 / 2   Row 3
 
0 0 0 1 7/8 1/ 8 0 1 / 8  1 / 4 1 / 4   Row 4 a11x1 + a12x2 + a13x3 + … + a1nxn = b1
0 0 0 0 1 1  8 3 18  10   Row 5

a21x1 + a22x2 + a23x3 + … + a2nxn = b2
Finally, transform C5 into 0 0 0 0 1 elements. (17)
a31x1 + a32x2 + a33x3 + … + a3nxn = b3
R1 + R5*(–3/4)  R1; R2 + R5*(19/8)  R2; R3 + R5*(3/4)  R3;
R4 + R5*(–7/8)  R4; Copy R5     
1 0 0 0 0 1 6  2  13 7  am1x1 + am2x2 + am3x3 + … + amnxn = bm
 
0 1 0 0 0  3  19 13 / 2 44  24  Its coefficient matrix is given by:
0 0 1 0 0 1  5 2 11  6 
   a11 a12 a13  a1n 
0 0 0 1 0 1 7 5 / 2  16 9   
0  a 21 a 22 a 23  a 2n 
 0 0 0 1 1  8 3 18  10 
A = [aij] =  a 31 a 32 a 33  a 3n  (18)
 
This forms augmented matrix [I|A-1]. The inverse, therefore       
is a  a mn 
 m1 a11 a11

1 6 2 13 7  while its variable, constant and solution column vector are
 
 3  19 13 / 2 44  24 given by
A-1 =   1  5 2 11 6 
   x1   b1   k1 
 1 7 5 / 2  16 9       
 1  8 18  10   x2   b2  k2 
 3
x=  x3  b=  b3  k=  k3  (19 - 21)
     
       
x  b  k 
 n  m  m
MATRIX INVERSION USING MS EXCEL
Note that the order of x and b are not necessarily the same. In
MS Excel has a built-in function MINVERSE which can be a compact matrix form, (17) can be written as
used determine the inverse of a matrix.
Ax = b (22)
The procedure:
If b = 0, (22) is said to be homogeneous, and its trivial
1. Enter the elements of the square matrix in vacant (visible)
solution vector k = 0. If b  0, (22) is said to be
cells.
nonhomogeneous and b is its nonhomogeneos term.
2. Highlight a cells (also visible) of the same order where the
inverse is to be placed. In this case, the system of equation in (22) may have no
3. Do the following: solution (inconsistent), a unique solution (consistent), and
infinitely many solution. Our discussion will cover the case
a. Type: = MINVERSE(
of consistent nonhomogeneous equations. In the meantime,
b. Highlight the matrix let us introduce a matrix that includes all the numbers
~
e. Type: ) appearing in (17) – the Augmented Matrix, A.
d. Press: Shift + Ctrl, Enter.  a11 a12 a13  a1n b1 
 
 a 21 a 22 a 23  a 2n b1 
~
A =  a31 a32 a33  a 3n b1  (23)
Example 6: Do Example 5 using MS Excel  
       
a a11 a11  a mn bm 
 m1 

A. Solution by the Cramer’s Rule


The Cramer’s Rule is used to solve (22) having n linear
equations in n unknowns on the condition that the
determinant of A shown in (18) should not be zero. The jth
component of the solution is given by:

Dj
xj = j = 1, 2, 3, …, n. (24)
Explanation: A
Step 1: Enter element in A3:E7 where the matrix Dj is formulated by replacing the jth column
Step 2: Highlight cells G3:K7 of A with b.

Step 3: Type: = MMINVERSE(A3:E7) Suggested Procedure:

Press: Shift + Ctrl, Enter 1. Formulate the matrices A, b , x and Dj.


2. Determine the determinants |A| and |Dj|s.
3. Get the value of the unknown using (24).
Let us now apply the Cramer’s rule to system of linear  1 2 4 3 1 1 4 3
equations. We will start with 2, then 3, and, finally, 4    
0 2 1 0 2 0 1 0
unknowns. D1 =  D2 = 
 4 0 1  2 3  4 1  2
   
Example 1: 2-equations with 2 unknowns by Cramer’s Rule  1 0 2 1  0 1 2 1 
Find x and y in 2x + 3y = 8, and x – 2y = –3.
1 2 1 3 1 2 4 1 
Solution:    
2 2 0 0 2 2 1 0
D3 =   D4 = 
 3 0  4  2 3 0 1  4
2 3  8  x    
Step 1: A =   , b=  , x=   0 0 1 1  0 0 2 1 
1  2  3  y
Step 2: Evaluation of determinants: (Do this!!!)
8 3 2 8 
D1 =   , and D2 =   |A| = 36, |D1| = –24, |D2| = 24, |D3| = 0, |D4| = 36
  3  2 1  3
Step 3: Evaluation of the unknowns:
Step 2: |A| = –7 |D1| = –7 |D2| = –14
x1 = = –24/36 = –2/3 x2 = 24/36 = 2/3
7 D1 D2 14
Step 3: x = = =1 y= = =2 x3 = 0/36 = 0 x4 = 36/36 = 1
A 7 A 7

Example 2: 3 equations with 3 unknowns by Cramer’s Rule


CRAMERS RULE USING MS EXCEL
Find x and y and z in:
4y – 3z = –2 2x –3y + 4z = –1 3x + 5z = 1. To solve system of linear equations by Cramer’s Rule in MS
Excel, you will just use the built-in functions MDETERM
Solution: and MMULT.
Step 1: Formulation of matrices: The procedure:
0 4 3  2  x 1. Enter the elements of A and b in vacant (visible) cells.
A = 2  3 4  , b =  
  1 , x =
 
 y 2. Determine the determinant of A using the MDETERM
3 0 5   1   z  function.
2. Formulate the Dn matrices and determine their
 2 4 3 0 2 3 determinants using the MDETERM function
D1 =   1  3 4  D2 = 2  1 4  3. Use (24) to solve for the unknowns.
 1 0 5   3 1 5  Example 4. Solve Example 3 using MS Excel

0 4 2
D3 = 2  3  1
3 0 1 

Step 2: Evaluation of determinants: (Do this!!!)


|A| = –19 |D1| = 57 |D2| = –19 |D3| = –38
Step 3: Evaluation of the unknowns:
D1 D2 D3
x= = –3 y= =1 z= =2
A A A

Example 3: 4 equations with 4 unknowns by Cramer’s Rule


Find unknowns in:
x1 – 2x2 + 4x3 + 3x4 = 1
2x1 + 2x2 + x3 = 0
3x1 + x3 – 2x4 = –4
Explanation:
2x3 + x4 = 1
Step 1: The elements of A and b are entered in A3:D6 and
G3:G6, respectively
Solution: Step 2: The determinant of A is placed on E5
Step 1: Formulation of matrices: Step 3: The Dn matrices and their determinants are
formulated and placed in cells as shown. Note that the b
1 2 4 3 1   x1  matrix are in bold notation.
     
A= 
2 2 1 0
,b=  0 ,x= x2  Step 4: The unknown matrix is shown in K3:K6 (just use the
3 0 1  2  4  x3 
      division (/) symbol.)
0 0 2 1   1   x 4 
B. Solution by the Gauss-Jordan Elimination 2x3 + x4 = 1
From (22), we can formulate the unknown in terms of the Solution:
coefficient matrix and constant vector, thus Step 1: Formulation of matrices:
Ax = b (22)
1 2 4 3 1   x1 
Premultiplying (22) with the inverse of A      
A= 
2 2 1 0
,b=  0 ,x= x2 
A-1Ax = A-1b (23) 3 0 1  2  4  x3 
     
-1 0 0 2 1   1   x 4 
Knowing that A A = I and Ix = x gives (23) becomes
x = A-1b (25)  10 10 2 26 

1  7 11  5 11 
where x and b are defined in (19) and (20). Since b is given, Step 2: A-1 =
the key to the solution is determination of matrix A-1 (which 36  6  6 6 30 
 
can be derived from the coefficient matrix A.  12 12  12  24

Suggested Procedure:  x1   10 10 2  26  1 
1. Formulate the matrices A, b and x. x   7 11  5 11  0 
1   
Step 3:  2  =
2. Get the inverse A (we have already discussed this!)  x3  36   6  6 6 30   4
3. Obtain the value of the unknowns using (25).      
 x4   12 12  12  24  1 
Let’s now go to some examples. For comparison purposes,
we will use similar example problems with the Cramer’s  x1  24 2 / 3
Rule.      
 x 2  = 1  24  =  2 / 3 
Example 1: 2-equations with 2 unknowns by G-JE.  x3  36  0   0 
     
Find x and y in 2x + 3y = 8, and x – 2y = –3.  4 
x  36   1 

Solution:
2 3  8  x GAUSS-JORDAN METHOD USING MS
Step 1: A =  ,b=  3 , x =  y
1  2     EXCEL

1 2 3  To solve system of linear equations by Gauss Jordan Method


Step 2: A-1 =
7 1  2 in MS Excel, you will just use the built-in functions
MINVERSE and MMULT functions.
 x 1 2 3   8  1  7  1  The procedure:
Step 3:  y  = 7 1  2  3 = 7 14  =  2
          1. Enter the elements of A and b in vacant (visible) cells.
Therefore, x = 1 and y = 2. 2. In vacant cells, determine the inverse of A using the
MINVERSE function.
Example 2: 3-equations with 3 unknowns by G-JE 2. Multiply the inverse of A with b to get the unknowns.
Find x and y and z in:
4y – 3z = –2 2x –3y + 4z = –1 3x + 5z = 1. Example 4. Do Example 3 using MS Excel
Solution:
Step 1: Formulation of matrices:
0 4  3  2 x
    1  y
A = 2  3 4  , b =  ,x=  
3 0 5   1   z 

 15 20  7 
1 
Step 2: A = -1
2 9 6 
19 
  9  12 8 

x  15 20  7    2   57 
 y 1     1 
19 
Step 3:   = 19  2  9 6    1 =
19 
 z    9  12 8   1   38 

x   3
 y  
  =  1  , which means x = –3, y = 1 and z = 2.
 z   2 

Example 3: 4 equations with 4 unknowns by G-JE


Find unknowns in:
x1 – 2x2 + 4x3 + 3x4 = 1
2x1 + 2x2 + x3 = 0
3x1 + x3 – 2x4 = –4

You might also like