You are on page 1of 13

First Exam Coverage

ES 21 Notes
MATRICES

c1
c
2

Definition
A matrix is a rectangular array of numbers or functions
arranged in rows and columns usually designated by a
capital letter and enclosed by brackets, parentheses or
double bars. A matrix may be denoted by:

a11 a12 ... a1n


a

21 a22 ... a2n

A
:
:
:

am1 am2 ... amn

1 i m

C.

The vertical groups of elements are called the columns of


the matrix. The jth column of A is

a1 j
a
2j

Square Matrix is a matrix in which the no. of


rows equals the no. of columns.

Principal Diagonal or Main Diagonal of a Square


Matrix consists of the elements a 11, a22, a33,
ann.

j n

The Trace of a Square Matrix is the sum of the


elements on the main diagonal of the matrix.

The size of a matrix is denoted by m x n (m by n) where m


is the number of rows and n is the number of columns.

D.

We refer to aij as the entry or the element in the ith row and
jth column of the matrix.

Upper Triangular Matrix a square matrix all


elements of which below the principal diagonal
are zero (aij = 0 for i>j).
Example:

u11 u12 u13


U 0 u22 u23
0 0 u33

We may often write a given matrix as


A = [aij].
SOME SPECIAL TYPES OF MATRICES
Row Matrix or Row Vector is a matrix consists
of only one row.
Example: B = [b1 b2 . . . bj . . .
B.

.
.
.

Order of a Square Matrix is the number of rows


or columns of the matrix. Thus, we can just refer
to a 3x3 matrix as a square matrix of order 3.

a3 j

A.

c
m

The horizontal groups of elements are called the rows of the


matrix. The ith row of A is

ai 2 ... ain

ci

Unless stated, we assume that all our matrices are


composed of real numbers.

ai1

.
.
.

E.

bn]

Lower Triangular Matrix a square matrix all


elements of which above the principal diagonal
are zero (aij = 0 for i<j).
Example:

Column Matrix or Column Vector is a matrix


consists of only one column.

l11 0 0
L l 21 l 22 0
l 31 l32 l 33

Example:

F.

Diagonal Matrix is a square matrix that is an


upper triangular and lower triangular at the same
time. The only non-zero elements are the
elements on the principal diagonal. (aij = 0 for i
j)
Example:

0
d11 0

D 0 d22 0
0
0 d33
ES 21 Notes
Page 1 of 13

First Exam Coverage


ES 21 Notes
G.

Scalar Matrix is a diagonal matrix whose


diagonal elements are equal.

A.

If A = (aij) and B = (bij) are matrices of the same size m x n,


then the sum A + B is another m x n matrix C = [c ij] where
cij = aij + bij for i = 1 to m and j = 1 to n. Matrix addition is
accomplished by adding algebraically corresponding
elements in A and B.

Example:

s 0 0
S 0 s 0
0 0 s
H.

Example:

1 2 4
A

3 2 1

Identity Matrix represented by In, a diagonal


matrix where all the elements along the main
diagonal are equal to 1 or unity.

1 0 0
I3 0 1 0
0 0 1

B.

SCALAR MULTIPLICATION

If A = (aij) is an m x n matrix and k is a real number (or a


scalar), then the scalar multiple of A by k is the m x n matrix
C = [cij] where cij = kaij for all i and j. In other words, the
matrix C is obtained by multiplying each element of the
matrix by the scalar k.
Examples:
We obtain

Symmetric Matrix a square matrix whose


element aij = aji.

2 0 1 3
6 0 3 9
3

4 3 2 5
12 9 6 15

Example:

4
1 2

S 2 2 5
4 5 3
K.

2
4 5
2

Skew Symmetric Matrix a square matrix whose


element aij = -aji.
C.

Example:

0 2 4
T 2 0 5
4 5 0

1 3
8 4 12

2 1 20 8
4
8 16 28
4 7

MATRIX SUBTRACTION

If A and B are m x n matrices, the difference between A and


B denoted as A B is obtained from the addition of A and (1)B.
A B = A + (-1)B
Matrix subtraction is accomplished by subtracting from the
elements of the first matrix the elements of the second
matrix correspondingly.

EQUALITY OF MATRICES

Example:

3 4 2
A

5 7 4

Two matrices A = (aij) and B = (bij) are equal if and only if the
following conditions are satisfied:
a)
b)
c)

They have equal number of rows.


They have equal number of columns.
All elements in A agree with the elements in
B. (aij=bij, for all i and j.)

1
c 2
y 1
2 andB
b
z

2
1
x 1 b 2

are equal if and only if x = 2, y = 1, z = 2, a = 3,


b = 4 and c = 1.

2 1 4

3 8 3

3 4 2
2 1 4
A B

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

7 8
4 3
5 (3)

Example: The matrices

x
A a
3

3 2 2
4 1 1

4 (2)
1 1

4 0 2

1 1 2

Null Matrix represented by is a matrix in


which all the elements are zero.

0 0 ... 0
0 0 ... 0


: :
:

0 0 ... 0
J.

3 2 2
B

4 1 1

1 2 4
A B

3 2 1
2 2
1 3

3 4 2 (1)

Example:

I.

MATRIX ADDITION AND SUBTRACTION

1
2

1 5 6

8 1 7

c 1

Note: We can only add or subtract matrices with the same


number of rows and columns.
D.

ELEMENTARY OPERATIONS ON MATRICES


ES 21 Notes
Page 2 of 13

MATRIX MULTIPLICATION

If A = (aij) is an m x n matrix and B = (bij) is an n x


p matrix, then the product of A and B, AB = C =
[cij] is an m x p matrix where

cij

aikbkj

The product is defined only if the


number of columns of the first factor
A (pre-multiplier) is equal to the
number of rows of the second factor
B (post-multiplier). If this is
satisfied, we say that the matrices
are comformable in the order AB.

MATRIX EXPONENTIATION

1(2) 2(3)
AB
3(2) 4(3)
6
8
AB

18 16

then A

1 1 2
2
3 1
2 4
3

Note: The transpose of a symmetric matrix is equal to itself.


PROPERTIES
AND
THEOREMS
ON
MATRIX
OPERATIONS:
MATRIX ADDITION
A+O=A
A + (-A) = O
A+B=B+A
(A + B) + C = A + (B + C)

Existence of Additive Identity


Existence of Additive Inverse
Commutative Property
Associative Property

SCALAR MULTIPLICATION
0 xA= O
1 x A= O
k l (A) = k (l A) = l (k A)
(k + l) A = k A + l A
k(A + B) = k A + k B

A(BC) = (AB)C
A(B + C) = AB + AC
(A + B)C = AC + BC
AI = IA = A

2 4
B

3 1

Associative Property
Left Distributive Property
Right Distributive Property
Existence of Multiplicative
Identity

kl (AB) = (k A)(l B) = (l A)(k B)

1(4) 2(1)
3(4) 4(1)

2(1) (4)(3)
BA
3(1) (1)(3)
10 12
BA
2
0

2
4

1 3

3 2
2
3

MATRIX MULTIPLICATION

The formula An will be defined as A A A A

1 2
A

3 4

k1

The formula tells us that in order to get the


element cij of the matrix C, get the elements of the
ith row of A (the pre-multiplier) and the elements
on the jth column of B (the post multiplier).
Afterwards, obtain the sum of the products of
corresponding elements on the two vectors.

Example:

for i = 1 to m and j = 1 to p

Note:

If

1
1

First Exam Coverage


ES 21 Notes

Note:

In general, Matrix Multiplication


commutative. That is, AB BA.

is

not

MATRIX TRANSPOSITION
(AT)T = A
(A + B)T = AT + BT
(k A)T = k AT
(AB)T = BTAT

2(2) (4)(4)
3(2) (1)(4)

In general (A1 A2 A3An-1 An)T= AnTAn-1TA3TA2TA1T


DETERMINANTS

Note: Although AB and BA are defined it is not necessary


that AB = BA.

Another very important number associated with a square


matrix A is the determinant of A which we will now define.
This unique number associated to a matrix A is useful in the
solutions of linear equation.

Example:

Permutation:

2 1
A 5
3
4 6
1.
2.
3.
E.

6 2 3
B

1 4 5

A x B is a 3 x 3 matrix while B x A is
a 2 x 2 matrix.
A x C is a 3 x 2 matrix but C x A is not
defined.
B x C is not defined but C x B is
defined (2 x 3).

MATRIX TRANSPOSITION

If A = [aij] is an m x n matrix, then the transpose of A,


denoted by AT=[aij] is an n x m matrix defined by aij=aji.
The transpose of A is obtained by interchanging the rows
and the columns of A.
Example:

Let
3 2, 3, , n} be the set of integers from 1 to n,
1 S={1,
C arranged
2 1 in increasing order. A rearrangement a 1a2a3an of
the
elements
in S is called a permutation of S.
By the Fundamental Principle of Counting we can put any
one of the n elements of S in the first position, any one of
the remaining (n-1) elements in the second position, any
one of the remaining (n-2) elements in the third position,
and so on until the nth position. Thus there are n(n-1)(n-2)
3*2*1 = n! permutations of S. We refer to the set of all
permutations of S by Sn.
Examples:
If S = {1, 2, 3} then S3 = {123, 132, 213, 231, 312, 321}
If S = {1, 2, 3, 4} then there are 4! = 24 elements of S4.
Odd and Even Permutations
A permutation a1a2a3an is said to have an inversion if a
larger number precedes a smaller one. If the total number of
ES 21 Notes
Page 3 of 13

First Exam Coverage


ES 21 Notes
inversion in the permutation is even, then we say that the
permutation is even, otherwise it is odd.
Examples: ODD and EVEN Permutation

This method is applicable to matrices with size


less than or equal to 3.
1.

S1 has only one permutation; that is 1, which is even since


there are no inversions.

a11
2.

S3 has 3! = 6 permutations: 123, 231and 312 are even while


132, 213, and 321 are odd.

DETERMINANT

Let A = [aij] be a square matrix of order n. The determinant


of A denoted by det(A) or A is defined by

det A A

a1j a2 j ...anj
1

where the summation is over all permutations j 1j2jn of the


set S = {1,2,,n}. The sign is taken as (+) if the permutation
is even and () if the permutation is odd.
Examples:

B.

a11a22 a21a12s

3 x 3 Matrices

a11 a12

S4 has 4! = 24 permutations: 1234, 1243, 1324, 1342, 1423,


1432, 2134, 2143, 2314, 2341, 2413, 2431, 3124, 3142,
3214, 3241, 3412, 3421, 4123, 4132, 4213, 4231, 4312,
4321.

DEFINITION:

a12

a21 a22

In the permutation 35241, 3 precedes 2 and 1, 5 precedes


2, 4 and 1, 2 precedes 1 and 4 precedes 1. There is a total
of 7 inversions, thus the permutation is odd.

For any Sn, where n>1 it contains n!/2 even permutations


and n!/2 odd permutations.

2 x 2 Matrices

a13

a11 a12

a21 a22 a23


a31 a32 a33

a21 a22
a31 a32

METHOD OF COFACTORS

Complementary Minor, det(Mij) or Mij


The complementary minor or simply minor of an element a ij
of the matrix A is that determinant of the sub-matrix M ij
obtained after eliminating the ith row and jth column of A.
Algebraic Complement or Cofactor, Aij
The algebraic complement or cofactor of an element a ij of
the matrix A is that signed minor obtained from the formula
(-1)i+j Mij
DETERMINANT USING THE COFACTOR METHOD
The determinant of a square matrix maybe obtained using
expansion about a row or expansion about a column. The
following formulas maybe used in getting the determinant:

If A = [a11] is a 1 x 1 matrix then det(A) or A = a11.

If A =

a11 a12
a

21 a22

(expansion about the ith row)


, then to get A we write down the

terms a1-a2-b and replace the dashes with the all-possible


permutations of S = {1, 2}, namely 12 (even) and 21 (odd).
Thus A = a11a22 - a12a21.

If A =

a11 a12 a13


a

21 a22 a23
a31 a32 a33

(expansion about the ith row)


, then to compute the A we

Note: We may choose any row or any column in getting the


determinant of a given matrix.
Example:

write down the six terms a1-a2-a3-, a1-a2-a3-, a1-a2-a3-, a1-a2-a3-,


a1-a2-a3-, a1-a2-a3-. Replace the dashes with all the elements
of S3, affix a (+) or (-) sign and get the sum of the six terms.
If A is a square matrix of order n, there will be n! terms in the
determinant of A with n!/2 positive terms and n!/2 negative
terms.

To evaluate

1
2

0
1

3
4

0
1

It is best to expand about the fourth row because it has the

numbers
of (zeros.
course
(2)(2)(2) (3)(1)(3) (0)(1)(1) most
(0)(
2)(3)
2)(1The
)(1)optimal
(3)(
1)(2)of action is to

8 9 0 0 2 6
9

expand about the row or column that has the largest


number of zeros, because in that case the cofactors Aij of
those aij which are zero need not be evaluated since the
product of aijAij = (0)Aij = 0.
THEOREMS ON DETERMINANTS
1.

METHODS IN GETTING THE DETERMINANT


A.

If a square matrix A = [aij] contains a row (or a column)


that has elements all equal to zero, then A = 0.
Example:

DIAGONAL METHOD

ES 21 Notes
Page 4 of 13

First Exam Coverage


ES 21 Notes

2.

1
2

2
3

0
00

a21 a22 a23


a31 a32 a33

The determinant of a square matrix A = [aij] is equal to


the determinant of its transpose AT = [aij].
(i.e. A = AT )
Example:

3.

1
4

2
2

3
3
2

1
2

4
2

1
4

Example:

4
4.

a
x

b
1
y 5 then4

a
2x

2a

2b

2a

2xy
2

4x y
6xy
5.

3x

2x

6y
18

8 y 2xy2x
2xy
3

6y
18

6.

2x y
6x2
4z

3x y

5z

xyz

3x

2z

9x2 3xy 15xz 3x2yz


xz

3y

3
a
2a

4a
6b
a b

3
6
1

If B = [bij] is a square matrix


from another square matrix
adding correspondingly the
column) to a multiple of the
(or column), then B = A .
Example:

2
4 2 and
2xy

5
5 3
2b2

4a
6b
a b

5
5
2b2

11. The determinant of a triangular matrix is equal to the


product of the elements in its principal diagonal.
Example:

x2
0
xy
x2
x y z y

0
0 x2 4
1

12. The determinant of an Identity Matrix is equal to 1.


ADJOINT OF A MATRIX

3x ofya square
5z matrix
xzyA=[aij] of order n is that
Adjoint
square matrix with the same order n denoted by adj(A)=[A ji]
2x
y Aij is
3x
2z of the xelement a ij of matrix A. The
where
the cofactor
0
adjoint 3
ofx
a matrix
2x
y is the
5ztranspose
xyz of the matrix of cofactors
of the elements of A.
2
2x
The

3x

xy2

4z

As a corollary to the sixth theorem, if the elements in a


row (or column) of a square matrix A = [a ij] are
multiples of the corresponding elements of another row
or column of the matrix A, then A = 0.
Example:

2
4
6y
8.

0
0
1

If two rows (or columns) of a matrix A = [a ij] are


identical then A = 0.
Example:

2x

7.

x2
0
xy
x2
x y z y

a11 a12

10. The determinant of the product of two square matrices A


= [aij] and B = [bij] of the same order n is equal to the
product of the determinant of A and the determinant of B.
Example:

Example:

0
0
1

a13

3
a
2x
8 y 2xy6
(2y
) x 13 y 2xy
4 y 2a
2
3
= 6
2xy
3. 18 2xy

If two row (or columns) of a square matrix A = [a ij] were


interchanged to form a new matrix B = [b ij], then B =
- A .

xy
x2
x2
0
x y z y

a12

then 4 y 6z3x 4
2x

3x

a23
a33

2
4 0
2xy

3y

xz

xy

Input: Square Matrix


Output: Square Matrix (with the same size as the original
matrix)
Notation: adj A, adj B
Step 1: Get the cofactors of all the elements in the
original matrix.
Recall: the cofactor of an element aij can be denoted as Aij
and is defined by:

of order n that is derived


A = [a ij] of order n, by
elements of a row (or
elements of another row

a13

a11

b21 c21 b22 c22 b23 c23 b21 b22 b23 c21
a31
a32
a33
a31 a32 a33
a31

2x

Example:

a22
a32

If the elements of one row (or column) of a square


matrix A = [aij] of order n may be expressed as
binomials such that two square matrices B = [b ij] and C
= [cij] both of order n, are formed after splitting the
binomial elements, then A = B + C .
Example:

b
2x
3
2 y 2(5) 10
6z
If 4
2b
6y
1

As a corollary to the third theorem, if A has a row (or


column) that has a common factor l, then this k may be
factored out of the determinant of A, where a simplified
matrix B is formed. (i.e. . A = k B .

a21
a31

9.

a11

If a row (or column) of a square matrix A = [aij] is


multiplied by a constant k, then the determinant of the
resulting matrix B = [bij] is equal to k times the
determinant of A (i.e. B = k A ).

1
If 2

a11 ka31 a12 ka32 a13 ka33

a11 a12 a13

A ij (1)i j Mij
Step 2: Set up the adjoint matrix by taking the transpose
of the matrix of cofactors.

ES 21 Notes
Page 5 of 13

adjA A ij
Example:

a
c

If A =

b
d

then adj(A) =

First Exam Coverage


ES 21 Notes
T

d b
c a

Since the determinant is not zero, then matrix A is


said to be non-singular. In this case, the inverse
exists and there is a need to set up the adjoint.
Getting the cofactors of all the elements in the
original matrix.

Inverse of a Matrix

Aij (1)i j Mij

The inverse of a square matrix A = [aij] of order n is that


matrix B = [bij] of the same order n such that AB = BA = In.
We denote the inverse matrix of A by A-1. Thus, we define
the inverse of A as that matrix A-1 such that

A11 (1)2

-1

A12 (1)3

-1

A(A ) = (A )A = In.
Not all matrices has its inverse. However, if the inverse of a
matrix exists, it is unique.
If the inverse of a matrix exists, we say that the matrix is
invertible or non-singular. Otherwise, we say that the matrix
is non-invertible or singular.
Matrix Inversion Using the Adjoint
and the Inverse

adjA
A

The proof of this needs the knowledge of the following


theorem:

1
3

1
3

A31 (1)4

A 33 (1)6

1
2
4

A 22 (1)4

A 32 (1)5

Notation: A-1, B-1

A 21 (1)3

A 23 (1)5

Matrix Inversion applies only to square matrices and can be


produced using the adjoint matrix and the
determinant.

A 1

A13 (1)4

1 1
1 3

2
5

1 1
1

10

1 1
2

12

12 9 10
Aij 1 1 2
,thus
adj
A
5 2
3
adj A
1

Consequently, A
A

The sum of the products of the elements in one row (or


column) and the cofactors of the elements of another row
(or column) of a given square matrix is zero.
From the above formula for inverse, it is highly suggested
that the determinant be computed first. If it so
happened that the matrix is singular (i.e., the
determinant is zero), then the inverse of the
matrix is said to be non-existent.

Note that it is a waste of effort to still produce the adjoint if

1 1 1
A 2 5 2
1 7 7

12
9
10

1
2

1 5
12
9
1 2

10 2 3

2
3

SOLUTION TO SYSTEM OF LINEAR EQUATIONS

the matrix is singular. Therefore, it is advised


that you first check for singularity.
Example: Set up the Inverse of the given matrix.

In general, we can think of a system of linear


equations as a set of m equations that contains n
unknowns. There are several forms by which a system of
equations can be written.

Using the diagonal method to compute for the determinant


of the given matrix:

We can have the equation form:

A 35 2 14 5 14 14 0
Since matrix A is singular, as evidenced by its zero
determinant, it can thus be concluded that the
Inverse of A (or A-1) does not exist.
Example 2:
matrix

1
A 1
4

1
2
2

a11x1 a12x 2 a13x 3 where


a1nxanij are
b
1
constant
coefficients
a21x1 a22x 2 a23x 3 a2nx n ofbthe
2

unknowns xj and bI are

a31x1 a32x 2 a33x 3 constants


a3nx n b3

Set up the Inverse of the given

1
3
3

am1x 1 am2x 2 am3x 3 amnx n bm


Or we can transform that to the matrix form:

A 6 12 2 8 6 3 7
ES 21 Notes
Page 6 of 13

First Exam Coverage


ES 21 Notes

a11
a
21
a31

a m1

a12

a13

a 22
a32

a 23
a33

am2

a m3

a1n
a 2 n
a 3n


a mn

x1

x 2
x3

x n

b1
b
2
b3


bm

12
9

1
1

10

5
2
3

To get x1, x2 and x3 , multiply A-1 to B:

x1
12 1 5
1

X x 2
9 1 2 *
7
x3
10 2 3

Referring to the matrix form, we can actually rewrite the


system of equations as a compact matrix operation:
AX = B.

1
6
5

Performing the operation A-1B will yield the solution

Where:
A
X
B

Coefficient Matrix
Column Matrix of Unknowns/Variables
Column Matrix of Constants

matrix:

SOLUTION TO SYSTEM OF n-LINEAR EQUATIONS


WITH n UNKNOWNS
A.

USING THE INVERSE METHOD

The Inverse Method maybe applied only to a


system of linear equations in which the number of
independent equations is equal to the number of unknowns.
If the number of equations is equal to the number of
unknowns, the equation AX = B will have a matrix of
coefficients that is square.
If the matrix of coefficients A is non-singular, the
solution to the system is unique. On the other hand, if A is
singular, either the system has a unique solution or no
solution at all.

Take

1
1
1

Make it a habit to check if all the computed values of the


unknowns satisfy all the given equations. Checking is done
by substituting the values x1 = 1, x2 = 1 and x3 = 1 to the
original equations.
Equation1 1(1) 1(1) + 1(1) =? 1Satisfied
Equation 21(1) + 2(1) + 3(1) =? 6Satisfied
Equation 34(1) 2(1) + 3(1)=? 5Satisfied
Since all the equations were satisfied, then (x1, x2, x3) = (1,
1, 1) is indeed the solution to the system.
SOLUTION TO SYSTEM OF EQUATIONS USING
CRAMER'S RULE

Derivation of the Solution for xis :

AX B

x1

X x2
x3

Recall that A system of equation n equations in n


unknowns can be modeled as a matrix operation AX = B.

note

that the
assumes
that A-1 exists. If A-1
( A 1A ) * X A 1 * B
does not exist, we can
not find the solution to
I * X A 1B
the system AX = B.

A 1 AX A 1 * B derivation

a11 a12 a13 a1n


a

21 a22 a23 a2n

x1 2 x 2 3 x3 6

a31 a32 a33 a3n



an1 an2 an3 ann

4 x1 2 x 2 3 x3 5

Let:

X A 1B

Example: Determine the values of x1, x2 and x3 in the


following system of equations.

x1 x 2 x3 1

A
xi
B
AI

Solution:
The above system of equations can be written in matrix
form:

1 1 1 x1
1 2 3 x

2
4 2 3 x3

1
6
5

We can write this in matrix form AX = B and let X = A-1B,


where:

1
A 1
4

1
2
2

1
3
3

x1
x
2

b1
b
2


x 3 b3




xn
bn

coefficient matrix
ith variable
right hand side constants
matrix resulting from replacing the
ith column of A by the column
vector of constants B

The solution of the system of equations can be determined


by using the formula:

xi

Ai
A

Notice that regardless of the variable i that is computed, the


denominator of the above formula is fixed at |A|. Therefore,
it is suggested that the determinant of the coefficient matrix
be the first to be computed.

Getting A-1
ES 21 Notes
Page 7 of 13

First Exam Coverage


ES 21 Notes

Example: Using Cramer's Rule, determine the values of x1,


x2 and x3 that simultaneously satisfy the following system of
equations.

1 2 1
3 3 1

1 2 1

x1

x
2

x3

1
2
3

a31 l 31 (1) l32 (0) l 33 (0) 0(0)


l 31 a 31
or
a 41 l 41 (1) l 42 (0) l 43 (0) l 44 (0)

Solution:
Compute for the determinant of A first:

or

1 2 1
A 3 3 1
1 2 1
A 3 2 6 3 2 6 6

A1
A
1
2

3

To set up the matrix A1, all you just have to do is to replace


the first column of A by b. Doing what has just been
described will result in:

or

a 32 l31 (u12 ) l 32 (1) l33 (0) 0(0)

or

l 42 a 42 l 41 (u12 )

A
0
x1 1 0
A
6
Applying the same process to solve x2 and x3:

1 1 1
A2
1
x2
* 3 2 1 1
A
6
1 3 1

Direct L-U Factorization:


In theory any square matrix A may be factored into a
product of lower and upper triangular matrices.
Let us take the case of a 4th order matrix:

a14 l11 0
a 24 l 21 l 22

a34 l 31 l32

a 44 l 41 l 42

a 23 l 21 (u13 ) l 22 (u 23 ) 0(1) 0(0)


u 23 [a 23 l 21 (u13 )] / l 22

or

a 24 l 21 (u14 ) l 22 (u 24 ) 0(u 23 ) 0(1)

or

1 u2 1[a l (u )] / l
24
24
21
14
22
A3
1
x3
* 3 3 2 1
A
6
1 a2
3l 31 (u13 ) l 32 (u 23 ) l 33 (1) 0(0)
33

SOLUTION TO SYSTEM OF LINEAR EQUATIONS USING


L-U FACTORIZATION

a13
a 23
a33
a 43

a 22 l 21 (u12 ) l 22 (1) 0(0) 0(0)


l 22 a 22 l 21 (u12 )

a 42 l 41 (u12 ) l 42 (1) l 43 (0) l 44 (0) or

A1 3 6 4 9 2 4 0

a12
a 22
a 32
a 42

u14 a14 / l11

l 32 a 32 l 31 (u12 )

1 2 1
A1 2 3 1
3 2 1

a11
a
21
a31

a 41

a13 l11 (u13 ) 0(u 23 ) 0(1) 0(0)


u13 a13 / l11
or
a14 l11 (u14 ) 0(u 24 ) 0(u 34 ) 0(1)
or

The right hand side matrix B is

l 41 a 41

a12 l11 (u12 ) 0(1) 0(0) 0(0)


or
u12 a12 / l11

Now, let us compute for the value of x1 by using the formula

x1

a 21 l 21 (1) l 22 (0) 0(0) 0(0)


l 21 a 21

or

0
0
l 33
l 43

0
0
*
0

l 44

or

l 33 a33 l 31 (u13 ) l 32 (u 23 )
a 43 l 41 (u13 ) l 42 (u 23 ) l 43 (1) l 44 (0)
l 43 a 43 l 41 (u13 ) l 42 (u 23 )

or

a 34 l 31 (u14 ) l 32 (u 24 ) l 33 (u 34 ) 0(1)
u 34 [ a34 l31 (u14 ) l32 (u 24 )] / l33

or

1 u12a u13l (uu14 ) l (u ) l (u ) l (1) or


44
41
14
42
24
43
34
44
0 1l 44 u 23a 44 u24l 41 (u14 ) l 42 (u 24 ) l 43 (u 34 )
0 0
1 u 34

to a system of equations using


0 0How to0get the
1 solution

L-U Decomposition Method?

Notice that the diagonal elements of the upper triangular


matrix have been set to values of 1 for reason of simplicity.
(L-U Factorization is not unique.)

Recall: A system of equations can be written as a compact


matrix operation AX = B

From matrix multiplication, we know that:

If we factor out the coefficient matrix A as L*U and


substitute to AX = B, we can generate the equation
L(UX)=B.

a11 l11 (1) 0(0) 0(0) 0(0)


or
l11 a11

Momentarily define UX = Y which suggests LY = B. From


this transformation, we have actually decomposed AX = b to
two systems of equations.
ES 21 Notes
Page 8 of 13

First Exam Coverage


ES 21 Notes
Two-stage solution:
I.
II.

Solve for Y in the equation LY = B using forward


substitution.
Solve for X in the equation UX = Y using back
substitution.

Example: Determine the values of xi's in :

4 2 1
3 5 1

1 2 1
Knowing that

x1

x
2

x3

3
4
8

4 2 1
A 3 5 1
1 2 1

The augmented matrix associated to a system of linear


equation AX=B is the matrix [A : B]. For example, we can
now rewrite the system of equation:

0 0 y1 34 y1 y31 3 4
3 y 7 y y4 1
7
3 2 0 y 2 y 4 51 y 2 52 y2 8y23 3

1 2 2 2 3
5
5
y
8
1
2 2 3

Note that the computed values of yi's here are not yet the
solution since the original system of equations is in terms of
xi's.
Stage 2: Back substitution using UX = Y

0
0

x1
x
2
x3

x3 3

1
1
1

as simply

ECHELON FORM OF A MATRIX

Stage 1: Forward substitution using LY = B

1
2
4
1
1
2
0
1

1 3 x

2 6 y

2 4 1 z
2
1 3 | 1
1
2 6 | 1 .
2 4 1 | 1

2
1

, therefore

4 0 0

L 3 72 0

5 5
1 2 2
1 1 1
2
4

1
and
U 0 1 2
0 0
1

1 1

1 2 5
2 1

1 6 and B 0
2
If A
7
3 3 8
7 4
1 2 5 | 2 1
7
1 6 | 0
2
then A : B is

3 3 8 | 7 4

x 3

3
3
x 2 1 4x 3 1 x 2 2
x 11 2 x 1 2 x x13 1
1
4
22 2 4 3
3

This time (x1, x2, x3) = (1, 2, 3) is the solution to the original
system of equations.
AUGMENTED MATRIX OF A AND B
If A is an m x n matrix and B is a p x n matrix, then the
augmented matrix of A and B denoted by [A : B] is the
matrix formed by the elements of A and B separated by
pipes.

An m x n matrix A is said to be in row echelon form if it


satisfies the following properties:
1.
All rows whose elements are all zeros, if
exist, are at the bottom of the matrix.
2.
If at least one element on a row is not equal
to zero, the first non-zero element is 1, and
this is called the leading entry of the row.
3.
If two successive rows of the matrix have
leading entries, the leading entry of the row
below the other row must appear to the
right of the leading entry of the other row.
An m x n matrix A is said to be in reduced row echelon form
if added to the first three properties it satisfies a fourth
property:
4.

If a column contains a leading entry of


some row, then all the other entries must
be zero.

Example:
The following matrices are not in row echelon form. (Why
not?)

1
0

A 0

0
0

2
1
0
0
0

0 1 3
0 1 3
0 1
9
0 0
0
0 0
0

2
5

0
1

1
0

B 0

0
0

0 0
1 2
0 1
0 0
0 0

0
0

1
0

The following matrices are in row echelon form but not in


reduce row echelon form.

1
0
D
0

2
1
0
0

3
2
1
0

4
3

1 0 5 6 2
E 0 1 0 0 8
0 0 1 0 0

The following matrices are in reduced row echelon form.


(Hence, in row echelon form.)

Example:
ES 21 Notes
Page 9 of 13

1
0

F 0

0
0

First Exam Coverage


ES 21 Notes

1
0
G
0

0
1
0
0

0
0
1
0

0
0

0 1 0 0 2
H 0 0 1 0 3
0 0 0 1 0

1 0 3
ON MATRIX EQUIVALENCE
THEOREMS
0 1 0
1. Every nonzero

m x n matrix A = [aij] is row (column)


0 0 to a matrix in row (column) echelon form.
J 0 equivalent

0 0 0
2.
Every nonzero m x n matrix A = [aij] is row (column)
0 equivalent
0 0 to a matrix in reduced row (column) echelon
form.

ELEMENTARY ROW (COLUMN) OPERATIONS ON


MATRICES

3.

Let AX = B and CX = D be two systems of m linear


equations in n unknowns. If the augmented matrices
[A : B] and [C : D] are row equivalent, then the linear
systems are equivalent (i.e. they have exactly the
same solutions).

4.

As a corollary to the third theorem, if A and B are row


equivalent matrices, then the homogeneous systems
AX = 0 and BX = 0 are equivalent.

An elementary row (column) operation on a matrix A is any


one of the following operations:
Type I.
Type II.

Interchange any two rows (columns).


Multiply a row (column) by a non-zero
constant k.
Type III. Add to elements of a row k times of the elements
of another row the correspondingly.
Example: Let

SOLUTIONS TO A SYSTEM OF m EQUATIONS in n


UNKNOWNS

0 2 0
1
A 3 1
6 4
2 8 2
2

In general a system of m equations in n unknowns may


be written in matrix form:

a11
a
21
a31

Interchanging rows 1 and 3 of A (R1R3) obtain

2
2 8 2
B 3 1 6 4
1 0 2 0

a m1

Multiplying row 3 by (R3 R3), we obtain

0
1
C 3 1
1 4

2 0
6 4
1
1

rearranging the order of the equations


multiplying both side of the equation by
a constant
working with two equations

ROW (COLUMN) EQUIVALENT MATRICES


An m x n matrix A is row (column) equivalent to an m x n
matrix B if B can be obtained from A by applying a finite
sequence of elementary row operations.

am2

a m3

x1
b1
x
b
2
2
x3 b3




bm
a mn x n

a12
a22

a13 a1n| b1
a23 a2n| b2

a31

a32

a33 a3n| b3


am3 amn| bm

Applying the theorems on equivalent matrices we now have


the following methods of solution:

As a applied to the augmented matrix [A : B] as a system of


equation, the three elementary row operation will
correspond to the following:

From this observation, we could see that as applied to a


operations does not alter the solution of the system.

a 23
a33

am1 am2

ELEMENTARY ROW OPERATIONS AS APPLIED TO THE


A SYSTEM OF EQUATION A:B

TY0PE III

a 22
a32

a1n
a 2 n
a 3n

a11
a
21

1 0 2 0
A 0 1
0 4
2 8 2
2

a13

This system may now be represented by the augmented


notation:

Adding 3 times the elements in row 1 to the elements in row


2 (R2R2 + 3R1), we obtain

TYPE I
TYPE II

a12

GAUSSIAN ELIMINATION METHOD


The objective of the Gaussian Elimination Method is to
transform the augmented matrix [A : B] to the matrix [A* :
B*] in row echelon form by applying a series of elementary
row transformations. Getting the solution of the system [A* :
B*] using back substitution will also give the solution to the
original system [A : B].
To reduce any matrix to row echelon form, apply the
following steps:
1. Find the leftmost non-zero column.
2. If the 1st row has a zero in the column of step 1,
interchange it with one that has a non-zero entry in
the same column.
3. Obtain zeros below the leading entry by adding
suitable multiples of the top row and to the rows
below that.
4. Cover the top row and repeat the same process
starting with step 1 applied to the leftover submatrix.
Repeat this process with the rest of the rows.

ES 21 Notes
Page 10 of 13

First Exam Coverage


ES 21 Notes
5.

For each row obtain leading entry 1 by dividing each


row by their corresponding leading entry.

Example: The linear system

2y

3z

2x
3x

z
z

8
3

SUBMATRIX AND RANK


SUBMATRIX
A submatrix of A=[aij] is any matrix obtained by eliminating
some rows and/or columns of the matrix A.

has the augmented matrix associated to the system

1
A : B 2
3

thus we have the solution (x, y, z) = (2, -1, 3).

9
8

Example: Let

1 |

9
2
3

3
4

y 2 3 1

x 2 y 3z 9

x 9 2(1) 3(3) 2

thus we have the solution (x, y, z) = (2, -1, 3).


GAUSS-JORDAN REDUCTION METHOD
On the other hand a second method called the GaussJordan Reduction Method gets rid of the back substitution
phase. The objective of the Gauss-Jordan Reduction
Method is to transform the augmented matrix [A : B] to the
matrix [A* : B*] in reduced row echelon form by applying a
series of elementary row transformations. Doing this will
automatically give the solution of the system [A* : B*] which
also provides the solution to the original system [A : B].
To reduce any matrix to reduced row echelon form, apply
the following steps (SINE):

3.
4.

Search search the ith column of the augmented


matrix from the ith row to the nth row for the
maximum pivot, i.e. element with the largest absolute
value.
Interchange assuming the maximum pivot occurs
in the jth row, interchange the ith row and the jth row
so that the maximum pivot will now occur in the
diagonal position.
Normalize normalize the new ith row by dividing it
by the maximum pivot on the diagonal position.
Eliminate eliminate the ith column from the first up
to the nth equation, except in the ith equation itself
using the transformations.

Example: The linear system

2y

3z

2x
3x

z
z

8
3

9
8
3

which can be transformed as a matrix in row echelon form

1 0 0 |
: B* 0 1 0 |
0 0 1 |

2
1
3

9
5

1 8
0 3 8 2
11 5 7 2

3 0
0 3

6
9

11 5

(remove
thirdrow)

8
2 (remove
first
, third

2
andfifthcolumn
)

1
8 (fourthco

5
remain

RANK OF A MATRIX
The rank of a matrix A = [aij] is the order of the largest
square submatrix of A with a non-zero determinant. We
denote the rank of A by rank(A) or simply r(A).
Example: What is the rank of A?

4
1 2 3

A 2 1 4
3
3 0 5 10
Solution:
Checking out first the determinants of 3x3 submatrices:

1
2

2
1

3
4 0

1
2

2
1

4
3

10

1
2

3
4

4
3

10

Since at least one 3x3 submatrix of A has a non-zero


determinant, then r(A) = 3.
Example: What is the rank of B?

has the augmented matrix associated to the system

3 |
1 2

A : B 2 1 1 |
3 0 1 |

6
11

z3
y z 2

2.

8
2

5 2

7
2
1
8

The following are some submatrices of A:

using back substitution we have

1.

3 0
0 3

which can be transformed as a matrix in row echelon form

1 2 3 |
*
*
A : B 0 1 1 |
0 0 1 |

2
3

Solution:

2
3
4
1
2 4
6
8

B
3
6
9
12

4 8 12 16

The determinant of B is equal to zero (THEOREM:


Proportional rows). And it can also be shown that 3x3
submatrices of B will have determinants equal to zero.

ES 21 Notes
Page 11 of 13

14

First Exam Coverage


ES 21 Notes

e.g.

2
3

4
6

8
12 0 (Rows are proportional)

9
1

16

But at least one 2x2 submatrix has non-zero determinant.

e.g.

2.

24 0

3.

The rank of a matrix is not altered by any


sequence of elementary row (column)
transformations.

3.

Let A = [aij] and B = [bij] be two mxn matrices, if


rank(A) = rank(B) then A and B are equivalent.

Example: What is the rank of C?

2
3
4
5
6

3
4
5
6
7

4
5
6
7
8

5
6

8
9

1 2 3 4 5
1 1 1 1 1

C' 1 1 1 1 1

1 1 1 1 1
1 1 1 1 1

:
:

R3' R3 R2
R4' R4 R3
R5' R5 R4

1 :
1 :

0
1

3 0
0
6

0
1

0
0

:
:

If r(A) < r([A:B]), then the system has no solution


or inconsistent.

For what values of k will the system of equations have


a) a unique solution
b) a non-unique solution
c) no solution

R2' R2 R1

1
1

1 0 0 : 5
2 1 1 : 3
4
4 2 2 : 2 0 1 0 : 3

6 1 1 : 6
0
0
0
:

2x

3y

3z

2k

2y
y

4z
5z

5k
8k2

Solution: In augmented matrix form, we have:

We could easily see that all 5x5, 4x4 and 3x3 submatrices
of C have determinants equal to zero (THEOREM: Identical
rows). But for at least one 2x2 submatrix of C has a nonzero determinant.

1 0 )

2
1

3 3 | 2k
2 4 | 5k
1 5 | 8k 2

Performing Gaussian Elimination Method:

Consequently r(C) = 2. But C and C are equivalent


matrices and hence they have equal ranks. Therefore r(C) is
also equal to 2.
RANKS AND THE TYPES OF SOLUTION TO A SYSTEM
OF EQUATION
Recall that for the system of m linear equations in n
unknowns AX = B. We can associate the system of equation
to the augmented matrix of the system [A:B].
The type of solution may be classified as unique, nonunique or inconsistent. Applying the concept of rank to the
augmented matrix [A:B], we have the following propositions:
1.

0
1

Example 1: Rank and the Type of Solution to a System

Solution:
Operating on rows of matrix C, we obtain the equivalent
matrix C

(e.g.

1
0

Example:

If A = [aij] and B = [bij] are mxn matrices, and


rank(A) = rank(B) = n, then rank(AB) = rank(BA) =
n.

1
2

C 3

4
5

1
3

If r(A) = r([A:B]) < n, then the solution to the


system is non-unique.

THEOREMS ON RANKS

2.

1
1

27 0
0
1

1 :

Example:

Therefore r(B) = 2.

1.

3 1 :
1 1 :

If r(A) = r([A:B]) = n then the solution to the


system is unique.
Example:
ES 21 Notes
Page 12 of 13

1
0

First Exam Coverage


ES 21 Notes

2 3 3 | 2k R1 R 2 1 2 4 | 5k
1 2 4 | 5k
2 3 3 |Performing
Gaussian
Elimination Method:

2
k


0 1 5 | 8k 2
0 1 5 | 81k 2 1 1 | 2
'

R 2 R 2 2R1 1 2 4 | 5k
0 1 5 | 8k

0 1 5 | 8k 2
'

R3 R3 R2 1 2 4 |
5k

0
1

5
|

8
k

0 0 0 | 8k 2 8k

Therefore we have the following conclusions:

m2 0

1 m2

0
| m 4
|

'

R 2 R 2 ( m 2)R1 1
1
1
|
2

0 m 2 m 1 | 2m 4

'
0
R 3 R 3 R1
0
m 2 1 | m 2
Therefore we have the following conclusions:
Therefore we have the following conclusions:
a) For a unique solution, r(A) = r[A:B] = n
This will be satisfied if m2-10 and m-20. Thus
we have a unique solution if m 1,2.

a) For a unique solution, r(A) = r[A:B] = n


There will be no value of k that will satisfy this
since r(A) = 2 < n =3.

b) For non-unique solutions, r(A) = r[A:B] < n.


This will happen when the last element in the third
row of matrix A and the augmented matrix are both equal to
zero.

b) For non-unique solutions, r(A) = r[A:B] < n.


This will be satisfied if r[A:B] is also equal to 2.
This will happen when the last element in the third row of
the augmented matrix is also equal to zero.

m2 - 1 = 0 and m+2 = 0.
There is no value of m that will satisfy both

8k2 - 8k = 0 k = 0, 1.

equation.

c) For the system to be inconsistent, r(A) < r[A:B]. This will


be satisfied if r[A:B] = 3 > 2. This will happen when the last
element in the third row of the augmented matrix is not
equal to zero.

The other value of m to be checked is when m = -2.


Substituting this to the system gives the system:

0
0

8k - 8k 0 k 0, 1.
2

Example 2:
For what values of m will the system of equations have
d) a unique solution
e) a non-unique solution
f) no solution

0
0

1
3

|
|

0
0

Clearly, we could see that the resulting system


gives a non-unique solution because, r(A) = r[A:B]=2 <3.
Thus, the system gives non-unique solutions when m = -2.

c
m 2c

m4

(m 2)a
a

Solution: In augmented matrix form, we have:

1
1 1
m2 0 1

1
1 m2

|
2
|
0
| m 4

c) For the system to be inconsistent, r(A) < r[A:B].


This will be satisfied if r[A:B] = 3 > 2. This will
happen when the last element in the third row of the
augmented matrix is not equal to zero but the last element
of the third row of A is equal to zero.
m2 1 = 0 and m+2 0.
Thus, the system is inconsistent when m = 1 .

ES 21 Notes
Page 13 of 13

You might also like