Solution of System of Linear Equations
Solution of System of Linear Equations
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)
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:
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:
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
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|
|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
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
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
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
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!!!)
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
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
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.
0 4 2
D3 = 2 3 1
3 0 1
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
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