You are on page 1of 6

Chapter2 ReviewofMatrixAlgebra g

2-1 Matrix Algebra


In this course, we need to solve system of linear equations in the form

a 11 x1 + a 12 x 2 + ... + a 1 n x n = b1

a 21 x1 + a 22 x 2 + ... + a 2 n x n = b 2 .......... .......... .......... .......... .... a n 1 x1 + a n 2 x 2 + ... + a nn x n = b n


where x1, x2, , xn are the unknowns. Eqn. (2-1) can be written in a matrix form as

(2-1)

[A ]{x } = {b }

(2-2)

where [A] is a (n x n) square matrix, {x} and {b} are (n x 1) vectors.

The square matrix [A] and the {x} and {b} vectors are given by,

a 11 a [A ] = 21 : a n1

a 12 a 22 : an2

... ... : ...

a1 n a2n , : a nn

x1 x {x } = 2 , and : xn

b1 b {b } = 2 : bn
(2-3)

Note: Element located at ith row and jth column of matrix [A] is denoted by aij. For example, element at the 2nd row and 2nd column is a22.

2-2 Matrix Multiplication


The product of matrix [A] of size (m x n) and matrix [B] of size (n x p) will results in matrix [C], with size (m x p).

[A ]
(m x n)

[B ]
(n x p )

[C ]
(m x p )

(2-4) (2 4)

Note: The (ij)th component of [C], i.e. cij, is obtained by taking the DOT product,
c ij = ( i th row of [ A ]) ( j th column of [ B ])

(2-5)
15 7

Example:

2 0

1 2 ( 2 x 3)

3 1

4 1 5 2 0 3 (3 x 2)

7 - 10

(2 x 2)

2-3 Matrix Transposition


If matrix [A] = [aij], then transpose of [A], denoted by [A]T, is given by [A]T = [aji]. Thus, the rows of [A] becomes the columns of [A]T. [ ] Example:
1 0 [ A] = 2 4 5 6 3 2

Then,

1 [ A ]T = 5

0 6

2 3

4 2

Note: In general, if [A] is of dimension (m x n), then [A]T has the dimension of (n x m).

2-4 Transpose of a Product


The transpose of a product of matrices is given by the product of the transposes of each matrices, in reverse order, i.e.

([ A ][ B ][ C ]) T = [ C ] T [ B ] T [ A ] T

(2-6) (2 6)

2-5 Determinant of a Matrix


Consider a 2 x 2 square matrix [x],

[x ] =

x11 x 21

x12 x 22

The determinant of this matrix is give by,


det [x ] = x11 x 22 x 21 x12

(2-7)

2-6 Solution of System of Linear Equations


System of linear algebraic equations can be solved for the unknown using the following methods: a) Cramers Rule Cramer s b) Inversion of Coefficient Matrix c) Gaussian Elimination** d) Gauss-Seidel Iteration Example: Solve the following SLEs using Gaussian elimination.
2 x1 + 1 x 2 3 x 3 = 11 4 x1 2 x 2 + 3 x 3 = 8 2 x1 + 2 x 2 1 x 3 = 6 (i) (ii) (iii)

Eliminate x1 from eq.(ii) and eq.(iii). Multiply eq.(ii) by 0.5 we get,

2 x1 + 1 x 2 3 x 3 = 11 2 x1 1 x 2 + 1 . 5 x 3 = 4

(i) (ii) *

2 x1 + 2 x 2 1 x 3 = 6 (iii)

Subtract S bt t eq.(ii)* f (ii)* from eq.(i), we obtain (i) bt i


2 x1 + 1 x 2 3 x 3 = 11 0 x1 + 2 x 2 4 . 5 x 3 = 7 (i) (ii) * *

2 x1 + 2 x 2 1 x 3 = 6 (iii)

Add eq.(iii) with eq.(i), y q( ) q ( ), yields


2 x1 + 1 x 2 3 x 3 = 11 0 x1 + 2 x 2 4 . 5 x 3 = 7 0 x1 + 3 x 2 4 x 3 = 5 (i) (ii) * * ( iii) *

Eliminate x2 from eq.(iii)*. Multiply eq.(ii)** by 3 and eq.(iii)* by 2 we get


2 x1 + 1 x 2 3 x 3 = 11 0 x1 + 6 x 2 13 . 5 x 3 = 21 0 x1 + 6 x 2 8 x 3 = 10 (i) (ii) * * * (iii) * *

Subtract eq.(iii)** from eq.(ii)***, we obtain


2 x1 + 1 x 2 3 x 3 = 11 0 x1 + 2 x 2 4 . 5 x 3 = 7 0 x1 + 0 x 2 5 . 5 x 3 = 11 (i) (ii) * * (iii) * * *

From eq.(iii)*** we determine the value of x3, i.e.


x3 = 11 = 2 5 .5

Back substitute value of x3 into eq.(ii)** and solve for x2, we get
x2 = 7 + 4 .5 ( 2 ) = 1 2

Back substitute value of x2 and x3 into eq.(i) and solve for x1, we get
x1 = 3

EXERCISE
Solve the following systems of linear equations by using the Gaussian elimination method.
a)

x1 + 3 x 2 2 x 3 = 2 2 x1 4 x 2 + 2 x 3 = 1 0 x1 + 4 x 2 + x 3 = 3

b) )

2 x1 + 1 x 2 3 x 3 = 11 4 x1 2 x 2 + 3 x 3 = 8 2 x1 + 2 x 2 2 x 3 = 6

EXERCISE
Solve the following systems of linear equations by using the Gaussian elimination method.

2 x1 + 3 x 2 x 3 + 4 x 4 = 19 x1 x 2 + 2 x 3 2 x 4 = 3 4 x1 + 2 x 2 3 x 3 x 4 = 15 3 x1 + 4 x 2 2 x 3 + x 4 = 21