You are on page 1of 33

UECM1653 - Mathematics for Engineering I

UECM1683 – Mathematics for Physics I

TOPIC 1: LINEAR ALGEBRA

Review of matrices operations

Definition 1.1:
A matrix is a rectangular array of numbers denoted by

⎡ a11 a12 ! a1n ⎤


⎢a a 22 ! a 2 n ⎥⎥
[ ]
A = aij = ⎢ 21
⎢ " " # " ⎥
aij is called an entry or element.
⎢ ⎥
⎣a m1 am2 ! a mn ⎦

- If a matrix A has m rows and n columns, then we say A is a matrix of order m by n


(written as m × n ).

- If m = n then A is called a square matrix of order n, and that the elements


a11 , a 22, …… , a nm are on the main diagonal of A .

Example:
⎛5 7 2⎞
i) ⎜⎜ ⎟⎟ is a 2 × 3 matrix (2 by 3 matrix).
⎝6 3 7⎠

⎛5 7 2⎞
⎜6 3 7⎟
ii) ⎜ ⎟ is a 4 × 3 matrix (4 rows, 3 columns).
⎜7 8 7⎟
⎜ ⎟
⎝1 2 3⎠

Basic operation of matrices

(a) Equality

Definition:
Two matrices A = ⎡a ⎤ and B = ⎡b ⎤ are equal if and only if aij = bij for
m × x ⎢⎣ ij ⎥⎦ m × x ⎢⎣ ij ⎥⎦
i = 1, 2…, m , and j = 1, 2…, n .

1
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

Example:
⎡1 2 − 1⎤ ⎡ 1 2 w⎤
The matrices A = 2 − 3 4 and B = ⎢ 2 x 4 ⎥ are equal (A = B), if and only if
⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎢⎣0 − 4 5 ⎥⎦ ⎢⎣ y − 4 z ⎥⎦
w = -1, x = -3, y = 0 and z = 5.

(b) Matrix Addition and subtraction

Definition:

If A = ⎡a ⎤ and B = ⎡b ⎤ , then
m × n ⎢⎣ ij ⎥⎦ m × n ⎢⎣ ij ⎥⎦

A + B = ⎡a + bij ⎤
⎢⎣ ij ⎥⎦

and A − B = ⎡a − bij ⎤ for i = 1, 2…, m , and j = 1, 2…, n .


⎢⎣ ij ⎥⎦

Example:

⎡1 − 2 3 ⎤ ⎡0 2 1 ⎤
Let A = ⎢ ⎥ and B = ⎢ ⎥ then
⎣ 2 − 1 4⎦ ⎣1 3 − 4⎦

⎡1 0 4⎤ ⎡1 − 4 2⎤
A+ B = ⎢ ⎥ and A − B = ⎢ ⎥
⎣3 2 0⎦ ⎣1 − 4 8⎦

(c) Scalar Multiplication

Definition:

If A = ⎡a ⎤ and c is a real number, then the scalar multiple of A by c


m × n ⎢⎣ ij ⎥⎦

cA = ⎡ca ⎤ for i = 1, 2…, m , and j = 1, 2…, n .


⎢⎣ ij ⎥⎦

Example:

2
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

⎡1 − 2 3 ⎤ ⎡1 − 2 3⎤ ⎡− 2 4 − 6⎤
Let A = ⎢ ⎥ then, − 2A = −2⎢ ⎥=⎢ ⎥
⎣ 2 − 1 4⎦ ⎣ 2 − 1 4⎦ ⎣ 4 2 − 8 ⎦

(d) Matrix Multiplication

Definition:

If A = ⎡a ⎤ and B = ⎡b ⎤ , then product of A and B.


m × t ⎢⎣ ij ⎥⎦ t × n ⎢⎣ ij ⎥⎦

AB = C m×n = ⎡c ⎤
⎢⎣ ij ⎥⎦
n
Where cij = ∑ aik bkj = ai1b1 j + ai 2 b2 j + ... + ain bnj for i = 1, 2, …, m and j = 1, 2, …, p
k =1

Note:
• AB is defined only when the number of columns of A is same as the number of
rows of B , i.e. Am×t Bt×n = C m×n
• AB ≠ BA .

(e) Transpose of a Matrix

Definition:

If A = ⎡a ⎤ , then the transpose of A, AT is the n × m matrix defined by


m × n ⎢⎣ ij ⎥⎦

AT = ⎡a ⎤ = ⎡a ⎤
T
⎢⎣ ij ⎥⎦ ⎢⎣ ji ⎥⎦
Thus the transpose of A is obtained from A by interchanging the rows and columns of A.

Example:

⎡ 1 − 3⎤
⎡1 − 2 3 ⎤
If A = ⎢ ⎥ , then A = ⎢ 2
T
2 ⎥⎥

⎣2 − 1 4⎦ 2×3 ⎢⎣− 1 7 ⎥⎦ 3×2

3
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

(f) Basic algebraic properties of matrix operations

(i) Matrix Addition


If A , B , and C are m × n matrices, then

a) A + B = B + A
b) A + ( B + C ) = ( A + B ) + C
c) There is a unique m × n matrix Om×n such that
A + Om×n = Om×n + A = A
for any m × n matrix A. The matrix Om×n is called m × n zero matrix
The m × n zero matrix is called additive identity of A.
d) For each m × n matrix A, there is a unique m × n matrix D such that
A + D = 0 where D = − A
The matrix − A is called the additive inverse of A.

(ii) Scalar Multiplication


If c and d are real number and A , and B are matrices, then

a) c(dA) = (cd ) A c) c( A + B) = cA + cB
b) 1A = A d) (c + d ) A = cA + dA

(iii) Matrix Multiplication


If A , B , and C are of the appropriate sizes, and c is a scalar, then

a) A( BC ) = ( AB)C c) C ( A + B) = CA + CB
b) ( A + B)C = AC + BC d) c( AB) = (cA) B

(iv) Properties of Transpose


If A , and B are matrices and c is a scalar, then

a) ( AT ) T = A
b) ( A + B) T = AT + B T
c) ( AB) T = B T AT
d) (cA) T = cAT

4
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

DETERMINANTS

Determinant of a square matrix:

(i) Determinant of a 2 × 2 matrix:

Definition:

⎡a a12 ⎤
If A = ⎢ 11 is a square matrix of order 2, then
⎣a 21 a 22 ⎥⎦
a11 a12
A = = a11a22 − a12 a21
a 21 a 22

Example:

Evaluate determinants of order 2.

3 1
1. = (3)(2) – (1)( – 4) =10
−4 2

2 6
2. = (2)(0) – (6)(– 6) = 36
−6 0

(ii) Determinant of a n × n matrix:

Evaluating determinants of a square matrix A of order n (n > 2)

With a given entry of A we associate the square matrix of order n − 1 obtained by deleting
the entries in the row and column in which the given entry lies.

5
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

For example, given the matrix

⎡ a11 a12 a13 ⎤


A = ⎢⎢a21 a22 a23 ⎥⎥
⎢⎣a31 a32 a33 ⎥⎦

With entry a11 , we delete the entries in row 1 and column 1, leaving the matrix of order 2
as follows:
⎡a 22 a 23 ⎤
⎢a ⎥
⎣ 32 a33 ⎦

The determinant of this matrix is called the minor of a11 .


a22 a23
Minor of a11 = = a22 a33 − a23 a32
a32 a33
Similarly
a21 a23
Minor of a12 = = a21a33 − a23a31
a31 a33

a21 a22
and Minor of a13 = = a21a32 − a22 a31
a31 a32

The cofactor of the entry aij is given by

[
cij = (−1)i+ j × minor of aij ]

Where i + j is the sum of the row number I and column number j which the entry lies.

Example:
a12 a13
1. Cofactor of the entry a21 , c21 = (−1) 2+1 = (−1)(a12 a33 − a13 a32 )
a32 a33

a12 a13
2. Cofactor of the entry a 31 , c31 = (−1) 3+1 = (−1)(a12 a 23 − a13 a 22 )
a 22 a 23

Note: The only difference between a cofactor and minor is the factor (−1) i+ j .

6
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

Determinant of a Square Matrix:

To find the determinant of any square matrix A of order n ( n > 2), select any row ( or column) of
A and multiply each entry in the row ( column) by cofactor. The sum of these products is defined
to be the determinant of A and is called a determinant of order n.

Example:
Evaluate the determinant of order 3 by using cofactor.

⎡ 12 − 1 3 ⎤
A = ⎢⎢ − 3 1 − 1⎥⎥
⎢⎣− 10 2 − 3⎥⎦

Solution: (Answer: A = - 1)

⎡ 12 − 1 3 ⎤
⎢ − 3 1 − 1⎥ = (a )[cofactor of a ] + (a )[cofactor of a ] + (a )[cofactor of a ]
⎢ ⎥ 11 11 12 12 13 13

⎢⎣− 10 2 − 3⎥⎦
[ ] [ ] [
= (12) (−1)1+1 × minor of a11 + (−1) (−1)1+ 2 × minor of a12 + (3) (−1)1+3 × minor of a13 ]
1 −1 − 3 −1 − 3 11
= 12 + (−1) 2 + (3)
2 −3 − 10 − 3 − 10 2
= −12 − 1 + 12
= −1

Properties:

1. If each of the entries in a row (or column) of A is 0, then A = 0.


2. If two row (or column) of A are identical, A = 0.
3. The determinant of product of two matrices of order n is the product of their
determinant, that is AB = A B .
4. The determinant of a square matrix and the determinant of its transpose are
equal, that is A = AT .

7
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

Inverse of Matrices

(i) The Multiplicative Identity Matrix of order n

Definition:
A n × n matrix with “1” on the main diagonal and “0” elsewhere is called the identity
matrix of order n.

I n = ⎡a ⎤ Where aii = 1and aij = 0 for i ≠ j .


⎢⎣ ij ⎥⎦
Example:

⎡1 0 0⎤
⎡1 0⎤
I2 = ⎢ ⎥ ; I 3 = ⎢⎢0 1 0⎥⎥
⎣0 1 ⎦ ⎢⎣0 0 1⎥⎦
Note: [ ]
A = aij
m×n
then AIn = A and ImA = A

(ii) The Multiplicative Inverse of a Matrix

Definition:
A n × n matrix A is called invertible, or nonsingular, if there exists a n × n matrix B such
that AB = BA = I n . B = A−1 is called the multiplicative inverse of A. Otherwise, A is
called noninvertible or singular.

Example:

⎡ 2 3⎤ ⎡− 1 3 ⎤
A=⎢ ⎥ and B = ⎢ 2⎥
⎣ 2 2⎦ ⎢⎣ 1 − 1⎥⎦
Find AB and BA .

Solution:

⎡ 2 3⎤ ⎡ − 1 3 ⎤ ⎡1 0⎤
AB = ⎢ ⎥⎢ 2 ⎥= ⎢0 1 ⎥
⎣2 2⎦ ⎢⎣ 1 − 1⎥⎦ ⎣ ⎦

⎡− 1 3 ⎤ ⎡2 3⎤ ⎡1 0⎤
BA = ⎢ 2 ⎥=⎢ ⎥=⎢ ⎥
⎢⎣ 1 − 1⎥⎦ ⎣2 2⎦ ⎣0 1⎦

AB = BA = I (identity matrix)

8
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

Theorem:

1. If the inverse of a matrix exists then it is unique.


2. If A and B are both invertible (nonsingular) n × n matrices, then AB is invertible
−1
and ( AB ) = B −1 A −1 .
3. If A is an invertible matrix, then A −1 is also invertible and ( A −1 ) −1 = A.
4. If A is an invertible matrix, then AT is also invertible and ( A −1 ) T = ( AT ) −1 .

(a) Finding the Inverse of a 2 × 2 Matrix:

⎡a b ⎤
If A = ⎢ ⎥ , then the inverse of a matrix is given by
⎣c d ⎦

1 ⎡ d − b⎤
A−1 = where ad − bc ≠ 0
ad − bc ⎢⎣− c a ⎥⎦

If ad − bc = 0 , then A is singular, matrix A has no multiplicative inverse.

Example:

⎡1 2⎤
Let A = ⎢ ⎥ . Find A−1 .
⎣3 7⎦

Solution:

det A = A = (1)(7) − (2)(3) = 7 − 6 = 1, thus

1 1 ⎡ 7 − 2⎤
A −1 = ×A= ⎢
det A 1 ⎣− 3 1 ⎥⎦

(b) Finding the Multiplicative Inverse of a 3× 3 Matrix By Using the Cofactor Methods:

9
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

For a matrix of order 3,

⎡ a11 a12 a13 ⎤


A = ⎢⎢a21 a22 a23 ⎥⎥
⎢⎣a31 a32 a33 ⎥⎦

The inverse of a matrix is given by

1
A −1 = adjoint of A
A
1
= [Cofacotors of A] T
A
1
=
A
[ ]
cij T

⎡ c11 c12 c13 ⎤


1 ⎢
= c 21 c 22 c 23 ⎥⎥
A⎢
⎢⎣c31 c32 c33 ⎥⎦

Note:
[
a) The cofactor of the entry aij , cij = (−1) i + j × minor of aij ]
b) [c ] is called the adjoint of A (adj A).
ij
T

1
Thus, A−1 = adj A
A

10
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

Example:
⎡3 − 2 1 ⎤
Find A if it is invertible, given that A = ⎢5 6
−1
2 ⎥⎥ .

⎢⎣1 0 − 3⎥⎦
Solution:

Firstly, we compute the cofactors of A, we have

6 2
c11 = (−1)1+1 = −18 c21 = −6 c31 = −10
0 −3

5 2
c12 = (−1)1+ 2 = 17 c22 = −10 c32 = −1
1 −3

5 6
c13 = (−1)1+3 = −6 c23 = −2 c33 = 28
1 0
Hence,
⎡− 18 − 6 − 10⎤
adj A = ⎢⎢ 17 − 10 − 1 ⎥⎥
⎢⎣ − 6 − 2 28 ⎥⎦
Secondly, by choosing the first row, compute the determinant of A, we have

A = a11c11 + a12 c12 + a13c13 = (3)(−18) + (−2)(17) + (1)(−6) = −94

⎡− 18 − 6 − 10⎤
1 1
Thus, A −1 = adj A = − ⎢⎢ 17 − 10 − 1 ⎥⎥
A 94
⎢⎣ − 6 − 2 28 ⎥⎦

11
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

Solving System of Linear Equations Using Inverse Matrix

Recall:
- A system of equation is a collection of two or more equation, each containing one or
more variables.
- A solution of a system of equation consists of values for the variable that reduce each
equation of the system to a true statement.
- To solve a system of equation means to find all solution of the system.
- When a system of equation has at least one solution, it is said to be consistent; otherwise
it is called inconsistent

Example of systems of linear equations

⎧ x1 + x2 + x3 = 6
⎧ 2x + y = 5 ⎪
⎨ ⎨3x1 − 2 x2 + 4 x3 = 9
⎩− 4 x + 6 y = − 2 ⎪x − x2 − x3 = 0
⎩ 1

In general, a system of m linear equations in n unknowns can be conveniently written as:

a11 x1 + a12 x2 + … + a1n xn = b1


a21 x1 + a22 x2 + … + a2 n xn = b2
!
am1 x1 + am 2 x2 + … + amn xn = bm

We define

⎡ a11 a12 ! a1n ⎤ ⎡ x1 ⎤ ⎡ b1 ⎤


⎢a a22 ! a2 n ⎥⎥ ⎢x ⎥ ⎢b ⎥
2⎥
A = ⎢ 21 X= ⎢ B= ⎢ 2 ⎥
⎢ " " " " ⎥ ⎢!⎥ ⎢!⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎣am1 am 2 ! amn ⎦ m×n ⎣ x n ⎦ n ×1 ⎣bm ⎦ m ×1

Thus, a system of linear equation can be written in matrix form: AX = B where A is the
coefficient matrix of the system, and B is the constant matrix. If B = 0, then the system is called a
homogeneous system of liner equations. Otherwise, it is called non-homogeneous system.

12
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

(i) Solving A system of Linear Equation Using Inverses

Linear system:

AX = B where A is n × n matrix
Suppose A is invertible, multiply both sides by A-1

A −1 AX = A −1 B
I n X = A −1 B
X = A −1 B
Thus, X = A−1 B is the solution of the linear system (a unique solution if A is non-singular)

Example:

Solve the following system by using the inverse matrix:

2 x + 8z = 8
− x + 4 y = 36
2x + y = 9
Solution: We define:

⎡ 2 0 8⎤ ⎡ x⎤ ⎡8⎤
A = ⎢⎢− 1 4 0⎥⎥ X = ⎢ y⎥
⎢ ⎥
B = ⎢36 ⎥
⎢ ⎥
⎢⎣ 2 1 0⎥⎦ ⎢⎣ z ⎥⎦ ⎢⎣ 9 ⎥⎦

1 1
Since the solution is X = A −1 B and A −1 =
| A|
[ ]
cij
T
=
| A|
adj A

1
⇒ X = A −1 B = adj A ⋅ B , so we need to find the cofactor matrix of matrix A and the
| A|
determinant of matrix A:

⎡ 0 0 − 9⎤ ⎡0 8 − 32 ⎤
[ ]
Cofactors of A = cij = 8 ⎢ − 16 − 2⎥⎥ ⇒ adj A = cij [ ]T
= ⎢ 0 − 16 − 8 ⎥⎥


⎢⎣− 32 − 8 8 ⎥⎦ ⎢⎣− 9 − 2 8 ⎥⎦
Det (A) = |A| = (0)(2) + (0)(0) + (-9)(8) = -72

1
Finally, the solution to the system is: X = A −1 B = adj A ⋅ B
| A|

13
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

⎡0 8 − 32⎤ ⎡ 8 ⎤
1 ⎢
=
⎢ 0 − 16 − 8 ⎥⎥ ⎢⎢36 ⎥⎥
− 72
⎢⎣− 9 − 2 8 ⎥⎦ ⎢⎣ 9 ⎥⎦
⎡ x ⎤ ⎡0⎤
∴ ⎢⎢ y ⎥⎥ = ⎢⎢9⎥⎥
⎢⎣ z ⎥⎦ ⎢⎣1⎥⎦
x = 0, y = 9 and z = 1

(ii) Cramer Rule

(a) Solving a linear system in two variable using determinants.

a1 x + b1 y = c1
a2 x + b2 y = c2
Then,
Dx Dy
x= and y=
D D

Where

c1 b1 a1 c1 a1 b1
Dx = Dy = D= ≠0
c2 b2 a2 c2 a2 b2

(b) Solving Three Equations in Three variable using determinants.

a1 x + b1 y + c1 z = d1
a2 x + b2 y + c2 z = d 2
a3 x + b3 y + c3 z = d 3

Dx Dy Dz
Then, x= y= z=
D D D

a1 b1 c1
Where D = a2 b2 c2 ≠ 0
a3 b3 c3

14
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

d1 b1 c1 a1 d1 c1 a1 b1 d1
Dx = d 2 b2 c2 D y = a2 d2 c2 Dz = a 2 b2 d2
d3 b3 c3 a3 d3 c3 a3 b3 d3

Example:
Solve the following system with Cramer’s rule.
x + 2y + z = 4
3x − 4 y − 2 z = 2
5 x + 3 y + 5 z = −1
Solution:

Dx Dy Dz
x= y= z=
D D D

1 2 1 4 2 1
D = 3 − 4 − 2 = −35 Dx = 2 − 4 − 2 = −70
5 3 5 −1 3 5

1 4 1 1 2 4
Dy = 3 2 − 2 = −105 Dz = 3 − 4 2 = 140
5 −1 5 5 3 −1

− 70 − 105 140
So, x= =2 y= =3 z= = −4
− 35 − 35 − 35

(iii) Gaussian Elimination

Gaussian elimination is a systematic way of simplifying a system of equation so that a solution


can easily be found. Manipulation of the matrix is carried out by performance a matrix into a
form known as echelon form, once in this form, the solution to the original equation is easily
found.

Procedure to use the Gaussian elimination methods:


1. Write down the augmented matrix.
2. Apply elementary row operation to obtain row=echelon form.
3. Solve the system.

15
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

Augmented matrix:
Consider the system of the linear equations:

4x + 3y = 6
3x − 8 y = 1

This system may be represented in the matrix form

⎛ 4 3 6⎞
⎜⎜ ⎟⎟
⎝ 3 − 8 1 ⎠

This is an example of an augmented matrix.

Note: the elements of the augmented matrix comprise the coefficients of x and y and also the
right-hand sides of the equation.

Types of solution by augmented matrix:

1. A unique solution
2. An infinite number of solutions
3. No solution

For example:

⎛1 3 7⎞
a) ⎜⎜ ⎟=
⎝0 1 2 ⎟⎠
⎛1 3 7⎞
b) ⎜⎜ ⎟ =
⎝0 0 0 ⎟⎠
⎛1 3 7⎞
c) ⎜⎜ ⎟ =
⎝0 0 2 ⎟⎠

Row-echelon form of an augmented matrix:

For a matrix to be in row-echelon form:


1. Any rows that consist entirely of zeros are the last rows of the matrix.
2. For a row that is not all zeros, the first non-zero element is a one. We call this a leading 1.
3. As you move down the rows of the matrix, the leading 1 is move progressively to the right.

16
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

Elementary row operations:

Given any augmented matrix we would like to be able to transform it into row-echelon form as
the solution of the system can then easily be found. The way we effect this transformation is by
using elementary row operations.

The elementary row operations that change a system but leave the solution unaltered are as
follows:
1. Interchange the order of the equation.
2. Multiply or divide an equation by non-zero constant.
3. Add, or subtract, a multiple of one equation to, or from, another equation.

When applied to a system, elementary row operations may change the equations but the solution
to the resulting system remains unchanged.

Example:

⎛ 2 5 12 ⎞ ⎛1 1 3 ⎞ ⎛ 1 1 3⎞ ⎛1 1 3⎞
⎜⎜ ⎟⎟ → ⎜⎜ ⎟⎟ → ⎜⎜ ⎟⎟ → ⎜⎜ ⎟⎟
⎝1 1 3 ⎠ ⎝ 2 5 12 ⎠ ⎝ 0 3 6⎠ ⎝ 0 1 2⎠
Interchange Row2 – (2*Row1) Row2 divided by 3
the rows

⎛3 −1 1 ⎞
(i) ⎜⎜ ⎟⎟
⎝ 2 3 19 ⎠

⎛2 1 2 8 ⎞
⎜ ⎟
(ii) ⎜ 1 − 3 3 − 4⎟
⎜4 2 −1 1 ⎟
⎝ ⎠

17
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

A system of linear equations can be solved by three methods;


1. Inverse matrix, X = A−1 B .
2. Cramer’s Rule.
3. Gaussian Elimination.

A system of linear equations can be categorized as homogenous or non-homogeneous.

(a) Homogeneous Equation , B =0

1. A ≠ 0 unique solution , that is X = 0 ( trivial solution)


2. A = 0 infinite solution ( non trivial solution)

The solution can be solved by Gaussian elimination methods.

(b) Non-homogeneous equation, B ≠ 0

1. A ≠ 0 unique solution
• Inverse matrix,
• Cramer’s rule,
• Gaussian elimination methods.

2. A =0 no solution
• Gaussian elimination methods

Exercise:

Solve the following with Gauss Elimination:

x + 2 y − 3z = 3 x − 4 y − 2 z = 21
a) 2 x − y − z = 11 b) 2 x + y + 2 z = 3
3 x + 2 y + z = −5 3 x + 2 y − z = −2

18
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

Example 1:

Find the currents in the circuit for the following network.

Solution:

Let assign currents to each part of the circuit between the node points. We have two node points.
This will give us three different currents. Let’s assume that the currents are in clockwise
direction.

So the current on the segment EFAB is I1, on the segment BCDE is I3 and on the segment EB is
I2 .

Using the Kirchhoff’s current Law for the node B yields the equation

I1 + I 2 = I 3

19
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

For the node E we will get the same equation. Then we use Kirchhoff’s voltage law

− 4I1 + (−30) − 5I 2 − 10I1 − 60 + 10I 2 = 0

When through the battery from (-) to (+), on the segment EF, potential difference is -30 and on
the segment FA moving through the resistor of 5Ω will result in the potential difference of -5I1
and in a similar way we can find the potential differences on the other segment of the loop
EFAB.

In the loop BCDE, Kirchhoff’s voltage law will yield the following equation:

− 30 I 3 + 120 − 10 I 2 + 60 = 0

Now we have three equations with three unknowns:

I1 + I2 − I3 = 0
− 19 I 1 + 10 I 2 = 90
− 10 I 2 − 30 I 3 = − 180

Answer: I1 = −1.698 I 2 = 5.7736 I 3 = 4.0755

20
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

Exercise (Past Final Exam Question)

Q1. Consider the following system if linear equations

3x − 2 y + 2z = 1
2x + y + 20 z = 3
4x − 3y = 2
(i) Show that the system is inconsistent.
[April 2005/2006]

Q2. Given
x + 2 y − 3z = 4
3x − y + 5 z = 2
4 x + y + (a 2 − 14) z = a + 2
Find the value of a, if this system of equations has no solution.
[April 2007/2008]

Q3. Consider the following system of linear equations:


x + 2y + z = a
2x − y + 3z = b
7 x + 4 y + 9z = c
Show that the system will have no solution under the condition 3a + 2b − c ≠ 0.
[Dec 2006/2007]

Q4. Solve the system of linear equations which is represented by the augmented matrix
⎡2 −1 0 3⎤
⎢− 1 2 − 1 − 3⎥⎥ . Assume that the unknowns are x, y and z.

⎢⎣ 0 −1 2 1 ⎥⎦
[Sept 2007/2008]

Q5. Find the value of a so that the following system has infinite solution.
x + 2 y − 3z = 4
3x − y + 5 z = 2
4 x + y + (a 2 − 14) z = a + 2

21
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

[April 2008/2009]

Q6. Solve the following system of linear equation by using Cramer’s rule.
x − 4y + z = 6
4 x − y + 2 z = −1
2 x + 2 y − 3z = −20
[April 2008/2009]

The eigenvalue problem

A problem that leads to a concept of crucial importance in many branches of mathematics and
its application is that of seeking non-trivial solutions x ≠ 0 to the matrix equation
AX = λX
This is referred to as the eigenvalue problem.

Such problems arise naturally in many branches of engineering. For example, in mechanics they
represent principal stress and the principal axes of stress in bodies subjected to external forces.
It also plays an important role in the stability analysis of dynamical systems.

Definition:

Let A be a n × n matrix. A number λ is said to be an eigenvalue of A if there exists a nonzero


solution vector X of the linear system,
AX = λX
The vector X is said to be eigenvector corresponding (associated) to the eigenvalue λ .

From the definition, λ = 0 can be eigenvalue but the zero vector is Not an eigenvector for any
matrix.

Example:
⎛1⎞ ⎛ 0 − 1 − 3⎞
⎜ ⎟ ⎜ ⎟
Verify that X = ⎜ − 1⎟ is an eigenvector of the matrix ⎜ 2 3 3 ⎟?
⎜1⎟ ⎜− 2 1 1 ⎟⎠
⎝ ⎠ ⎝

Solution:

⎛ 0 − 1 − 3⎞ ⎛ 1 ⎞ ⎛ − 2 ⎞ ⎛1⎞
⎜ ⎟⎜ ⎟ ⎜ ⎟ ⎜ ⎟
⎜ 2 3 3 ⎟ ⎜ − 1⎟ = ⎜ 2 ⎟ = −2⎜ − 1⎟
⎜− 2 1 1 ⎟⎠ ⎜⎝ 1 ⎟⎠ ⎜⎝ − 2 ⎟⎠ ⎜1⎟
⎝ ⎝ ⎠
Since AX = λX where λ = −2 , then X is an eigenvector of A.

22
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

Consider a polynomial f (t ) = an t n + ! + a1t + a0 .If A is a square matrix, and then we define


f ( A) = an An + ! + a1 A + a0 I

Where I is the identity matrix (same size as A). In particular, we say that A is a root or zero of the
polynomial f (t ) if f ( A) = 0 .

Example:

⎛1 2⎞
Let A = ⎜⎜ ⎟⎟ and f (t ) = 2t 2 − 3t + 7
⎝3 4⎠

⎛ 1 2 ⎞⎛ 1 2 ⎞ ⎛ 1 2 ⎞ ⎛ 1 0 ⎞ ⎛18 14 ⎞
So f (A) = 2⎜⎜ ⎟⎟⎜⎜ ⎟⎟ − 3⎜⎜ ⎟⎟ + 7⎜⎜ ⎟⎟ = ⎜⎜ ⎟⎟
⎝ 3 4 ⎠⎝ 3 4 ⎠ ⎝ 3 4 ⎠ ⎝ 0 1 ⎠ ⎝ 21 39 ⎠

Characteristics polynomial and Characteristics equation of a matrix

The system of simultaneous equations


AX = λX
Where A is an n × n matrix and x = ( x1 , x2 , … , xn )T is an n × 1 column vector can be written in the
form
(λI − A) x = 0 (1)
Where I is the n × n identity matrix.

If det (λI − A) ≠ 0 then (1) has only the zero solution x = 0.


On the other hand if c(λ ) = det(λI − A) = 0 , then (1) has a non-trivial solution x ≠ 0 .
Hence (1) has non-zero solution if and only if det (λI − A) = 0 .

Here c(λ ) = det(λI − A) is the expansion of the determinant and is a polynomial of degree n in λ
, called the characteristics polynomial of A.

Thus,
c(λ ) = λn + cn−1λn−1 + … + c1λ + c0 (2)

Where the cj are the coefficients.

And the equation c(λ ) = 0 is called the characteristics equation of A.

23
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

Example:

Find the characteristics equation for the matrix


⎛2 2 1⎞
⎜ ⎟
A = ⎜1 3 1⎟
⎜1 2 2⎟
⎝ ⎠
Solution:

By (2), the characteristic equation for A is the cubic equation


λ −2 −2 −1
c (λ ) = − 1 λ −3 −1 = 0
−1 −2 λ −2
λ3 − 7λ2 + 11λ − 5 = 0

Methods of finding eigenvalues and respective eigenvectors

Suppose A is n × n matrix.

Step 1: Find the roots of the characteristics equation


λI − A = 0
The roots λ1 , λ2 , λ3 , … , λn are the eigenvalus of A.

Step 2: For each λ j , j = 1,2, … , n , find the respective


eigenvector X j by solving
(λ j I − A) X = 0

Example:

24
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

Determine the eigenvalues and eigenvectors for the matrix A.


⎛ 1 1 − 2⎞
⎜ ⎟
A = ⎜−1 2 1 ⎟
⎜ 0 1 −1⎟
⎝ ⎠
Solution:
The characteristic equation, λI − A = 0

λ −1 −1 2
1 λ − 2 −1 = 0
0 −1 λ +1

(λ − 1)[(λ − 2)(λ + 1) − 1] − [−(λ + 1) + 2] = 0


(λ − 1)((λ2 − λ − 2) = 0

Hence, the eigenvalues are λ1 = 2 , λ2 = 1and λ3 = −1

⎛1 −1 2 ⎞
⎜ ⎟
For λ1 = 2 , we have λI − A = 2 I − A = ⎜ 1 0 − 1⎟ , now we find the eigenvector of A associated to
⎜0 −1 3 ⎟
⎝ ⎠
λ1 = 2 , so we solve, (2 I − A) X = 0
⎛ 1 − 1 2 ⎞ ⎛ x1 ⎞
⎜ ⎟⎜ ⎟
⎜ 1 0 − 1⎟ ⎜ x2 ⎟ = 0 x1 = x3 , x2 = 3x3 , let x3 = t , then x1 = t and x2 = 3t
⎜ 0 −1 3 ⎟ ⎜ x ⎟
⎝ ⎠⎝ 3⎠

⎛1⎞
⎜ ⎟
Thus the eigenvectors e1 corresponding to eigenvalue λ1 = 2 are given by t ⎜ 3 ⎟
⎜1⎟
⎝ ⎠

For λ =1
⎛ 3⎞
⎜ ⎟
the eigenvectors e1 corresponding to eigenvalue λ = 1 are given by t ⎜ 2 ⎟
⎜1⎟
⎝ ⎠
For λ = 3

25
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

⎛1⎞
⎜ ⎟
the eigenvectors e1 corresponding to eigenvalue λ = 1 are given by t ⎜ 0 ⎟
⎜1⎟
⎝ ⎠

Exercise:

Determine the eigenvalues and eigenvector for the matrix A.


⎛ 5 8 16 ⎞
⎜ ⎟
A=⎜ 4 1 8 ⎟
⎜ − 4 − 4 − 11⎟
⎝ ⎠

Eigenvalues of triangular matrices

Theorem:
If A is an n × n triangular matrix (upper triangular, lower triangular, or diagonal), then the
eigenvalues of A are the entries on the main diagonal of A.

Example:

By inspection, the eigenvalues of the lower triangular matrix


⎛1 0 0⎞
⎜ ⎟
A = ⎜ − 1 2 0 ⎟ are λ =1, λ =2 , λ =3
⎜ 5 − 8 3⎟
⎝ ⎠

Notes:
In practical problems, the matrix A is often so large that computing the characteristics equation is
not practical. As a result, various approximation methods are used to obtain eigenvalues.

Eigenvalues and invertibility

Theorem:

26
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

A square matrix A is invertible if and only if λ =0 is NOT an eigenvalue of A.


Some usefull properties of eigenvalues

Property 1 : The sum of the eigenvalues of A is


n n

∑λ i = trace( A) = tr ( A) = ∑ aii
i =1 i =1
n
Property 2 : The product of the eigenvalues of A is ∏λ i = det A
i =1
where det A denoted the determinant of the matrix A.

Property 3: Suppose A is invertible and λ1 , λ2 , !, λn are the


eigenvalues of A, then the eigenvalues of A-1 are
1 1 1
, ,…,
λ1 λ2 λn
Property 4 : A and the transposed matrix AT have the same eigenvalues

Property 5 : if k is a scalar then the eigenvalues of kA are


kλ1 , kλ2 , !, kλn

Property 6 : If k is a scalar and I the identity matrix then the


eigenvalues of A+kI are respectively λ1 + k , λ2 + k ,!, λn + k

Property 7 : if k is a positive integer then the eigenvalues of Ak are


λ1k , λ2 k , !, λn k

Exercise (Past Final Exam Question):

⎡1 ⎤ ⎡− 2 2 1 ⎤
Q1. Given that 2 is one of the eigenvectors of the matrix ⎢ 2 1 2⎥, find the
⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎢⎣5 ⎥⎦ ⎢⎣ 1 2 6⎥⎦
corresponding eigenvalues.
[April 2005/2006]

⎡a b ⎤
Q2. Given A = ⎢ ⎥
⎣c d ⎦
(i) Find the characteristic equation in term of a, b, c and d.
(ii) Hence show that the eigenvalues of a 2 x 2 matrix A can be expressed as
1
[ ]
λ = tr( A) ± tr( A) 2 − 4det( A) where tr( A) = a + d and det (A) =ad – bc.
2

27
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

− b ± b 2 − 4ac
[Hint: Quadratic formula: x = ]
2a
⎡3 0 ⎤
(iii) Use the result in (ii) to find the eigenvalues of ⎢ ⎥.
⎣8 − 1⎦
[April 2007/2008]

⎡3 1 ⎤
Q3. If the eigenvalues of matrix A = ⎢ ⎥ are 2 and 8, find x.
⎣5 x ⎦
[Dec 2006/2007]

⎡ 1 1 − 2⎤
Q4. Determine the eigenvalues for the matrix A = ⎢− 1 2 1 ⎥, hence find the eigenvector
⎢ ⎥
⎢⎣ 0 1 − 1⎥⎦
corresponding to the smallest eigenvalue of the matrix A.
[Dec 2007/2008]

⎡ 1 − 4 2⎤
Q5. If zero is one of the eigenvalues of the matrix A = ⎢ 7 3 3⎥⎥, find its corresponding

⎢⎣15 2 8⎥⎦
eigenvector. [Sept 2006/2007]

⎡ 4 0 1⎤
Q6. Find the characteristic equation for matrix A = ⎢ − 2 1 0 ⎥ . Hence find its eigenvalues.
⎢ ⎥
⎢⎣ − 2 0 1 ⎥⎦
[April 2008/2009]
The Diagonalization

A square matrix is called a diagonal matrix if all the off diagonal elements are zero. A diagonal
matrix has the appearance

⎡d1 0 ! 0 0⎤
⎢0 d2 ! 0 0 ⎥⎥

D=⎢0 0 # 0 0⎥
⎢ ⎥
⎢" " ! d n −1 0⎥
⎢⎣ 0 0 ! 0 d n ⎥⎦

Diagonal matrices have many pleasant properties. Let A and B be n × n diagonal matrices with
diagonal elements, respectively aii and bii .

28
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

1. A + B is diagonal with diagonal elements aii + bii .


2. AB is diagonal with diagonal elements aii bii .
3. |A| = a11a 22 a33 ....a nn the product of the diagonal elements.
4. A is nonsingular exactly when each diagonal element is nonzero (so A has nonzero
1
determinant). In this event, A-1 is the diagonal matrix having diagonal elements .
aii
5. The eigenvalues of A are its diagonal elements.
⎛0⎞
⎜ ⎟
⎜0⎟
⎜!⎟
⎜ ⎟
6. ⎜ 1 ⎟ with all zero elements except for 1 in the i, the 1 place, is an eigenvector
⎜0⎟
⎜ ⎟
⎜!⎟
⎜ ⎟
⎝0⎠
corresponding to the eigenvalue aii .

Most matrices are not diagonal. However, sometimes it is possible to transform a matrix to a
diagonal one. This will enable us to transform some problems to simpler one.

Definition:
An n × n matrix A is diagonalizable if there is an n × n matrix P such that P −1 AP is a diagonal
matrix. In this case we say that P is diagonalizes A.

Theorem:
Let A be n × n . Then A is diagonalizable if and only if A has n linearly independent
eigenvectors. Furthermore, if P is the n × n matrix having these eigenvectors as columns, then
P −1 AP is the n × n diagonal matrix having the eigenvalues of A down its main diagonal, in the
order in which the eigenvectors were choose as columns of P.
In addition, if Q is any matrix that diagonalizes A, then necessarily the diagonal matrix
Q −1 AQ has the eigenvalues of A along its main diagonal, and the columns of Q must be eigenvectors of A, in
the order in which the eigenvalues appear on the main diagonal of Q −1 AQ .

Example:

Let
⎛ −1 4⎞
A = ⎜⎜ ⎟⎟.
⎝ 0 3 ⎠

29
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

⎛1⎞ ⎛1⎞
A has eigenvalues -1 and 3, its corresponding linearly independent eigenvectors is ⎜⎜ ⎟⎟ and ⎜⎜ ⎟⎟ .
⎝0⎠ ⎝1⎠
Form
⎛ 1 1⎞
P = ⎜⎜ ⎟⎟.
⎝ 0 1⎠
Determine
⎛ 1 − 1⎞
P −1 = ⎜⎜ ⎟⎟.
⎝ 0 1 ⎠
A simple computation show that
⎛ −1 0⎞
P −1 AP = ⎜⎜ ⎟⎟
⎝ 0 3⎠
a diagonal matrix with the eigenvalues of A on the main diagonal, and the order in which the eigenvectors were
used to form the columns of P.

If we reverse the order of these eigenvectors as columns and define


⎛1 1 ⎞
Q = ⎜⎜ ⎟⎟.
⎝1 0 ⎠
then,
⎛3 0 ⎞
Q −1 AQ = ⎜⎜ ⎟⎟
⎝ 0 − 1⎠
With the eigenvalues along the main diagonal, but now in the order reflecting the order of the eigenvectors
used in forming the columns of Q.

Exercise:
In each of the following problem, produce a matrix P that diagonalizes the given matrix, or show that the
matrix is not diagonalizable. Determine P −1 AP

⎛5 0 0 ⎞
⎜ ⎟
Q1. ⎜1 0 3 ⎟
⎜0 0 − 2⎟
⎝ ⎠

5−λ 0 0
C (λ ) = 1 −λ 3 = (5 − λ )[− λ (−2 − λ )] = λ (λ + 2)(λ + 5) = 0
0 0 −2−λ

and the eigenvalues of A are λ1 = 0, λ2 = 5, λ3 = −2, Corresponding eigenvectors are

30
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

⎛0⎞ ⎛ 5⎞ ⎛ 0 ⎞
⎜ ⎟ ⎜ ⎟ ⎜ ⎟
eˆ1 = ⎜ 1 ⎟ eˆ2 = ⎜ 1 ⎟ eˆ3 = ⎜ − 3 ⎟
⎜0⎟ ⎜0⎟ ⎜ 2⎟
⎝ ⎠ ⎝ ⎠ ⎝ ⎠

⎛0 5 0 ⎞
⎜ ⎟
P = ⎜1 1 3 ⎟
⎜0 0 − 2⎟
⎝ ⎠

⎛0 0 0 ⎞
−1
⎜ ⎟
P AP = ⎜ 0 5 0 ⎟
⎜0 0 − 2⎟
⎝ ⎠

⎛ 2 0 0⎞
⎜ ⎟
Q2. ⎜0 2 1⎟
⎜ 0 −1 2⎟
⎝ ⎠
C (λ ) = (λ − 2)(λ2 − 4λ + 5) = 0

and the eigenvalues of A are λ1 = 2 , λ2 = 2 + i , λ3 = 2 − i, Corresponding eigenvectors are

⎛1⎞ ⎛ 0⎞ ⎛0⎞
⎜ ⎟ ⎜ ⎟ ⎜ ⎟
eˆ1 = ⎜ 0 ⎟ eˆ2 = ⎜ 1 ⎟ eˆ3 = ⎜ 1 ⎟
⎜0⎟ ⎜i⎟ ⎜− i⎟
⎝ ⎠ ⎝ ⎠ ⎝ ⎠

⎛1 0 0 ⎞
⎜ ⎟
P = ⎜0 1 1 ⎟
⎜0 i − i⎟
⎝ ⎠

⎛2 0 0 ⎞
−1
⎜ ⎟
P AP = ⎜ 0 2 + i 0 ⎟
⎜0 0 2 − i ⎟⎠

31
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

⎛− 2 0 1 ⎞
⎜ ⎟
Q3. ⎜ 1 1 0 ⎟
⎜ 0 0 − 2⎟
⎝ ⎠

C (λ ) = (λ + 2) 2 (λ − 1) = 0

and the eigenvalues of A are λ1 = 1 , λ2 = λ3 = −2 Corresponding eigenvectors are

⎛ 0⎞ ⎛ − 3⎞
⎜ ⎟ ⎜ ⎟
eˆ1 = ⎜ 1 ⎟ eˆ2 = eˆ3 = ⎜ 1 ⎟
⎜ 0⎟ ⎜ 0 ⎟
⎝ ⎠ ⎝ ⎠
A does not have three linearly independent eigenvectors (the repeated eigenvalues has only one
independent eigenvector), and so is not diagonalizable.

⎛0 0 0⎞
⎜ ⎟
Q4. ⎜1 0 2⎟
⎜ 0 1 3⎟
⎝ ⎠
C (λ ) = λ (λ2 − 3λ − 2) = 0

3 + 17 3 − 17
and the eigenvalues of A are λ1 = 0 , λ2 = , λ3 = , Corresponding eigenvectors
2 2
are

32
UECM1653 - Mathematics for Engineering I
UECM1683 – Mathematics for Physics I

⎛ − 2⎞ ⎛ 0 ⎞ ⎛ 0 ⎞
⎜ ⎟ ⎜ ⎟ ⎜ ⎟
eˆ1 = ⎜ − 3 ⎟ eˆ2 = ⎜ 4 ⎟ eˆ3 = ⎜ 4 ⎟
⎜ 1 ⎟ ⎜ 3 + 17 ⎟ ⎜ 3 − 17 ⎟
⎝ ⎠ ⎝ ⎠ ⎝ ⎠
⎛− 2 0 0 ⎞
⎜ ⎟
P = ⎜−3 4 4 ⎟
⎜ 1 3 + 17 3 − 17 ⎟
⎝ ⎠

⎛ ⎞
⎜ ⎟
⎜0 0 0 ⎟
3 + 17
P −1 AP = ⎜ 0 0 ⎟
⎜ 2 ⎟
⎜ 3 − 17 ⎟
⎜0 0 ⎟
⎝ 2 ⎠

33

You might also like