Chap 4 MATRIX (S - Week 6)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

ECC 3011

Engineering Mathematics 1 (3+0)

4 : MATRICES
4.1 Definition and properties
4.2 Determinants

4.3 Inverse of matrix


4.4 System solution of linear equations
using Cramer’s rule
4.5 Gauss elimination and iterative methods
4.6 Rank, eigen values and eigen vectors

4.7 Symmetric matrices


4.3 Inverse of matrix

 If 𝐴𝐴 and 𝐵𝐵 are 𝑛𝑛 × 𝑛𝑛 matrices, then the matrix 𝐵𝐵 is the inverse of


matrix 𝐴𝐴 (or vice versa) if and only if 𝐴𝐴𝐴𝐴 = 𝐵𝐵𝐵𝐵 = 𝐼𝐼.
 The inverse matric is written as 𝐴𝐴−1 = 𝐵𝐵
 Two methods:

Inverse matrix

ERO – Elementary Row Elimination Adjoint Method

 Properties of inverse matrix:


 If A is non-singular then 𝐴𝐴 ≠ 0 and 𝐴𝐴−1 = (𝑎𝑎𝑎𝑎𝑎𝑎 𝐴𝐴)/ 𝐴𝐴
 If A is singular then 𝐴𝐴 = 0 and 𝐴𝐴−1 does not exist
 𝐴𝐴𝐴𝐴 −1 = 𝐵𝐵−1 𝐴𝐴−1
Inverse of a 2x2 matrix
 The inverse of matrix 𝐴𝐴 is 𝐴𝐴−1 such that 𝐴𝐴 × 𝐴𝐴−1 = 𝐼𝐼, the unit matrix.
 Example :
1 2 𝑎𝑎 𝑏𝑏
matrix 𝐴𝐴 be and inverse matrix, 𝐴𝐴−1 be .
3 4 𝑐𝑐 𝑑𝑑
Since 𝐴𝐴 × 𝐴𝐴−1 = 𝐼𝐼,
1 2 𝑎𝑎 𝑏𝑏 1 0
× =
3 4 𝑐𝑐 𝑑𝑑 0 1
𝑎𝑎 + 2𝑐𝑐 𝑏𝑏 + 2𝑑𝑑 1 0
=
3𝑎𝑎 + 4𝑐𝑐 3𝑏𝑏 + 4𝑑𝑑 0 1

Solving gives
𝑏𝑏 + 2𝑑𝑑 = 0, 𝑏𝑏 = −2𝑑𝑑 ---------------------(1)
4
3𝑎𝑎 + 4𝑐𝑐 = 0, 𝑎𝑎 = − 𝑐𝑐 -------------------(2)
3
 Substitute for a and b gives:  Thus, the inverse matrix
4
− 𝑐𝑐 + 2𝑐𝑐 −2𝑑𝑑 + 2𝑑𝑑
1 2 −𝟐𝟐 𝟏𝟏
1 0 is
3
= 3 4 𝟏𝟏. 𝟓𝟓 −𝟎𝟎. 𝟓𝟓
4 0 1
3 − 𝑐𝑐 + 4𝑐𝑐 3(−2𝑑𝑑) + 4𝑑𝑑
3
2
𝑐𝑐 0 1 0
3 =
0 −2𝑑𝑑 0 1
2 3
𝑐𝑐
= 1 thus 𝑐𝑐 = = 1.5 ----------(3)
3 2
−2𝑑𝑑 = 1, 𝑑𝑑 = −0.5, -------------(4)

plug in (3 &4) into (1&2); thus


𝑏𝑏 = −2𝑑𝑑 ; 𝑏𝑏 = −2 −0.5 = 1
4 4 3
𝑎𝑎 = − 𝑐𝑐 ; 𝑎𝑎 = − = −2
3 3 2
Inverse matrix 2x2 – quicker method
𝑝𝑝 𝑞𝑞
 For any matrix , the inverse may be obtained by:
𝑟𝑟 𝑠𝑠
 Interchange the position of 𝑝𝑝 and 𝑠𝑠
 Changing the signs for 𝑞𝑞 and 𝑟𝑟
𝑠𝑠 −𝑞𝑞
−𝑟𝑟 𝑝𝑝 ,
𝑝𝑝 𝑞𝑞
 Multiplying the new matrix by determinant of
𝑟𝑟 𝑠𝑠
 Example:
1 2
 The inverse of matrix is
3 4
4 −2 1 4 −2 1 −𝟐𝟐 𝟏𝟏
 × = × =
−3 1 4−6 −3 1 −2 𝟏𝟏. 𝟓𝟓 −𝟎𝟎. 𝟓𝟓
Inverse of a 3x3 or nxn matrix – Adjoint Method
 The adjoint of a square matrix 𝐴𝐴 (𝑎𝑎𝑎𝑎𝑎𝑎 𝐴𝐴) is obtained by
 Forming a matrix B of a cofactors of 𝐴𝐴
 Transposing matrix B to give 𝐵𝐵 𝑇𝑇 ,
 where 𝐵𝐵𝑇𝑇 is the matrix obtained by writing the rows of 𝐵𝐵
as the columns of 𝐵𝐵𝑇𝑇 . Then the adj 𝐴𝐴 = 𝐵𝐵𝑇𝑇
 The inverse of matrix 𝐴𝐴, 𝐴𝐴−1 is given by:

𝑎𝑎𝑎𝑎𝑎𝑎 𝐴𝐴 𝐵𝐵𝑇𝑇
𝐴𝐴−1 = =
𝐴𝐴 𝐴𝐴

Where 𝑎𝑎𝑎𝑎𝑎𝑎 𝐴𝐴 = adjoint of matrix A


𝐴𝐴 = determinant of matrix A
Example 4.3.1
3 4 −1
 Determine the inverse matrix of 2 0 7
1 −3 −2
Example 4.3.2
1 5 −2
 Find the inverse of 3 −1 4
−3 6 −7
4.4 System solution of linear equations
using Cramer’s rule
Linear equations
 Linear equations and number of variables can be written as,
𝑎𝑎11 𝑥𝑥1 + 𝑎𝑎12 𝑥𝑥2 + ⋯ . +𝑎𝑎1𝑛𝑛 𝑥𝑥𝑛𝑛 = 𝑏𝑏1
𝑎𝑎21 𝑥𝑥1 + 𝑎𝑎22 𝑥𝑥2 + ⋯ . +𝑎𝑎2𝑛𝑛 𝑥𝑥𝑛𝑛 = 𝑏𝑏2
𝑎𝑎𝑚𝑚𝑚 𝑥𝑥1 + 𝑎𝑎𝑚𝑚𝑚 𝑥𝑥2 + ⋯ . +𝑎𝑎𝑚𝑚𝑚𝑚 𝑥𝑥𝑛𝑛 = 𝑏𝑏𝑚𝑚
 A solution to a linear system are real values of 𝑥𝑥1 , 𝑥𝑥2 , … 𝑥𝑥𝑛𝑛 which satisfy
every equations in the linear systems.
 The procedure for solving linear simultaneous equations in two
unknowns using matrices is:
1. Write the equations in the form 2. Write the matrix equation corresponding
𝑎𝑎1 𝑥𝑥 + 𝑏𝑏1 𝑦𝑦 = 𝑐𝑐1 to these equations
𝑎𝑎2 𝑥𝑥 + 𝑏𝑏2 𝑦𝑦 = 𝑐𝑐2 𝑎𝑎1 𝑏𝑏1 𝑥𝑥 𝑐𝑐1
× 𝑦𝑦 = 𝑐𝑐
𝑎𝑎2 𝑏𝑏2 2

𝑎𝑎1 𝑏𝑏1 4. Multiply both side by the inverse matrix


3. Determine inverse matrix
𝑎𝑎2 𝑏𝑏2
5. Solve for x and y
4.4 System solution of linear
equations using Cramer’s rule
Cramer’s rule
 Given the system of linear equations 𝐴𝐴𝐴𝐴 = 𝑏𝑏, where 𝐴𝐴 is an 𝑛𝑛 ×
𝑛𝑛 matrix, 𝑥𝑥 and 𝑏𝑏 are 𝑛𝑛𝑛𝑛𝑛 matrices. If 𝐴𝐴 ≠ 0, then the solution to
the system is given by;

𝐴𝐴1 𝐴𝐴2 𝑛𝑛
𝑥𝑥1 = , 𝑥𝑥2 = , … . 𝑥𝑥𝑛𝑛 =
𝐴𝐴 𝐴𝐴 𝐴𝐴
for 𝑖𝑖 = 1, 2, … , 𝑛𝑛 where 𝐴𝐴𝑖𝑖 is the matrix found by replacing
the 𝑖𝑖 𝑡𝑡𝑡 column of 𝐴𝐴 with 𝑏𝑏.

 Cramer’s rule states that if ;


𝑎𝑎11 𝑥𝑥 + 𝑎𝑎12 𝑦𝑦 + 𝑎𝑎13 𝑧𝑧 = 𝑏𝑏1
𝑎𝑎21 𝑥𝑥 + 𝑎𝑎22 𝑦𝑦 + 𝑎𝑎23 𝑧𝑧 = 𝑏𝑏2
𝑎𝑎31 𝑥𝑥 + 𝑎𝑎32 𝑦𝑦 + 𝑎𝑎33 𝑧𝑧 = 𝑏𝑏3 , Then ..
𝐷𝐷𝑥𝑥 𝐷𝐷𝑦𝑦 𝐷𝐷𝑧𝑧
𝑥𝑥 = , 𝑦𝑦 = , 𝑧𝑧 =
𝐷𝐷 𝐷𝐷 𝐷𝐷

𝑎𝑎11 𝑎𝑎12 𝑎𝑎13


Where: 𝐷𝐷 = 𝑎𝑎21 𝑎𝑎22 𝑎𝑎23
𝑎𝑎32 𝑎𝑎32 𝑎𝑎33

𝑎𝑎11 𝑎𝑎12 𝑎𝑎13 𝑎𝑎11 𝑎𝑎12 𝑎𝑎13 𝑎𝑎11 𝑎𝑎12 𝑎𝑎13


𝐷𝐷 = 𝑎𝑎21 𝑎𝑎22 𝑎𝑎23 𝐷𝐷 = 𝑎𝑎21 𝑎𝑎22 𝑎𝑎23 𝐷𝐷 = 𝑎𝑎21 𝑎𝑎22 𝑎𝑎23
𝑎𝑎32 𝑎𝑎32 𝑎𝑎33 𝑎𝑎32 𝑎𝑎32 𝑎𝑎33 𝑎𝑎32 𝑎𝑎32 𝑎𝑎33

𝑏𝑏1 𝑎𝑎12 𝑎𝑎13 𝑎𝑎11 𝑏𝑏1 𝑎𝑎13 𝑎𝑎11 𝑎𝑎12 𝑏𝑏1


𝐷𝐷𝑥𝑥 = 𝑏𝑏2 𝑎𝑎22 𝑎𝑎23 𝐷𝐷𝑦𝑦 = 𝑎𝑎21 𝑏𝑏2 𝑎𝑎23 𝐷𝐷𝑧𝑧 = 𝑎𝑎21 𝑎𝑎22 𝑏𝑏2
𝑏𝑏3 𝑎𝑎32 𝑎𝑎33 𝑎𝑎32 𝑏𝑏3 𝑎𝑎33 𝑎𝑎32 𝑎𝑎32 𝑏𝑏3
Example 4.4.1
Solve the following simultaneous equation using the Cramer’s rule

𝑥𝑥 + 𝑦𝑦 + 𝑧𝑧 = 4
2𝑥𝑥 − 3𝑦𝑦 + 4𝑧𝑧 = 33
3𝑥𝑥 − 2𝑦𝑦 − 2𝑧𝑧 = 2
Example 4.4.2
 Use Cramer’s rule to determine the solution to the following
system of linear equation.

3𝑥𝑥1 − 𝑥𝑥2 + 5𝑥𝑥3 = −2


−4𝑥𝑥1 + 𝑥𝑥2 + 7𝑥𝑥3 = 10
2𝑥𝑥1 + 4𝑥𝑥2 − 𝑥𝑥3 = 3
4.5 Gauss elimination and iterative
methods
Gauss elimination
 A method of solving a linear system by bringing the augmented
matrix to an echelon matrix
 Then the solution is found by using back substitution.

 Gaussian Elimination
1. Write a system of linear equations as an augmented matrix
2. Perform the elementary row operations to put the matrix
into row-echelon form
3. Convert the matrix back into a system of linear equations
4. Use back substitution to obtain all the answers
Gauss elimination
1. Linear equation 𝐴𝐴𝐴𝐴 = 𝑏𝑏 ius brought into augmented matrix
𝑎𝑎11 𝑎𝑎12 … 𝑎𝑎1𝑛𝑛 𝑏𝑏1
𝑎𝑎21 𝑎𝑎22 … 𝑎𝑎2𝑛𝑛 𝑏𝑏2
𝐴𝐴: 𝑏𝑏 = ⋮ ⋮ ⋱ ⋮ 𝑏𝑏3
𝑎𝑎𝑚𝑚𝑚 𝑎𝑎𝑚𝑚𝑚 … 𝑎𝑎𝑚𝑚𝑚𝑚 𝑏𝑏𝑚𝑚

1 𝑐𝑐 … 𝑐𝑐 𝑑𝑑1
0 1 … 𝑐𝑐2𝑛𝑛 𝑑𝑑2
2. to echelon matrix 𝑑𝑑3
⋮ ⋮ ⋱ ⋮
0 0 … 1 𝑑𝑑𝑚𝑚

3. Solution using Gauss Elimination Method


Row-Echelon Form
A matrix is in row-echelon form when
the following conditions are met.
𝟏𝟏 2 3 4
1. If there is a row of all zeros, then it 0 0 1 3
is at the bottom of the matrix. ⟹ 𝑝𝑝 𝐴𝐴 = 3
0 0 0 1
2. The first non-zero element of any 𝟎𝟎 𝟎𝟎 𝟎𝟎 𝟎𝟎
row is a one. That element is called
𝟏𝟏 ∗ ∗ ∗
the leading one. 0 0 1 ∗ ⟹ 𝑝𝑝 𝐴𝐴 = 3
3. The leading one of any row is to 0 0 0 1
the right of the leading one of the
𝟏𝟏 2
previous row.
0 1 ⟹ 𝑝𝑝 𝐴𝐴 = 2
0 0
Example of Echelon Matrix and rank of
matrix
Reduced Row-Echelon Form
 All of the conditions of row-echelon 1 2 𝟎𝟎 0
form are met and all elements above and 𝟎𝟎 0 1 𝟎𝟎
below the leading ones are zero. ⟹ 𝑝𝑝 𝐴𝐴 = 3
0 0 𝟎𝟎 1
1. If there is a row of all zeros, then it is at 𝟎𝟎 𝟎𝟎 𝟎𝟎 𝟎𝟎
the bottom of the matrix. 𝟏𝟏 0 ∗ 0 ∗
2. The first non-zero element of any row is 0 𝟏𝟏 ∗ 0 ∗ ⟹ 𝑝𝑝 𝐴𝐴 = 3
a one. That element is called the leading 0 0 0 𝟏𝟏 ∗
one.
𝟏𝟏 𝟎𝟎
3. The leading one of any row is to the 𝟎𝟎 1 ⟹ 𝑝𝑝 𝐴𝐴 = 2
right of the leading one of the previous 0 𝟎𝟎
row.
Example of Reduced Echelon
4. All elements above and below a leading Matrix and rank of matrix
one are zero.
Example 4.5.1
Solve the following system using Gauss Elimination Method.

2𝑥𝑥1 − 3𝑥𝑥2 − 𝑥𝑥3 + 2𝑥𝑥4 + 3𝑥𝑥5 = 4


4𝑥𝑥1 − 4𝑥𝑥2 − 𝑥𝑥3 + 4𝑥𝑥4 + 11𝑥𝑥5 = 4
2𝑥𝑥1 − 5𝑥𝑥2 − 2𝑥𝑥3 + 2𝑥𝑥4 − 𝑥𝑥5 = 9
2𝑥𝑥1 + 𝑥𝑥3 + 4𝑥𝑥5 = −5
Example 4.5.2
 Consider the following simultaneous equations:

𝑥𝑥 + 𝑦𝑦 + 𝑧𝑧 = 4
2𝑥𝑥 − 3𝑦𝑦 + 4𝑧𝑧 = 33
3𝑥𝑥 − 2𝑦𝑦 − 2𝑧𝑧 = 2
4.6 Rank, eigen values and eigen
vectors
Rank
 Number of row that is non zero in a echelon or reduced echelon
matrix.
 Rank is denotes as 𝑝𝑝(𝐴𝐴)
 Example
1 2 3 4
0 0 1 3
⟹ 𝑝𝑝 𝐴𝐴 = 3
0 0 0 1
0 0 0 0

1 ∗ ∗ ∗
0 0 1 ∗ ⟹ 𝑝𝑝 𝐴𝐴 = 3
0 0 0 1

1 2
0 1 ⟹ 𝑝𝑝 𝐴𝐴 = 2
0 0
4.6 Rank, eigen values and eigen
vectors
Eigen values and eigen vectors
 Eeigenvalues or sometimes called as characteristic values or
latent roots.
 The eigenvalues of a 𝑛𝑛 × 𝑛𝑛 matrix A are the 𝑛𝑛 zeros of the
polynomial 𝑃𝑃 𝜆𝜆 = 𝐴𝐴 − 𝜆𝜆𝜆𝜆 or equivalently the 𝑛𝑛 roots of the nth
degree polynomial equation 𝐴𝐴 − 𝜆𝜆𝜆𝜆 = 0
 𝜆𝜆 (lambda) a scalar called eigenvector.
 𝐴𝐴 − 𝜆𝜆𝜆𝜆 is called as Characteristic determinant.
 Solving the
characteristic equations 𝐴𝐴 − 𝜆𝜆𝜆𝜆 = 0 will give the
values(s) of the eigenvalues.
 Eigenvectors also known as Characteristic Vectors
 A non zero vector 𝑥𝑥
𝐴𝐴𝐴𝐴 = 𝜆𝜆𝜆𝜆
Example 4.6.1
3 4
 Determine the eigenvalues of the matrix 𝐴𝐴 =
2 1
Example 4.6.2
1 3 0
Show that 𝑥𝑥 = is eigentvector of 𝐴𝐴 = . Hence, find the
2 8 −1
corresponding eigenvalues
Example 4.6.3
3 4
Determine the eigenvectors of the matrix 𝐴𝐴 =
2 1
4.7 Symmetric matrices

 A square matrix A is said to be symmetric if 𝐴𝐴𝑇𝑇 = 𝐴𝐴.


 Two important resuslts concerning the eigenvalues and
eigenvectors of such matrices are :
 The eigenvalues of a real symmetric matrix are real
 For 𝑛𝑛 × 𝑛𝑛 real symmetric matrix, 𝑛𝑛 linearly independent
eigenvector 𝑒𝑒1 , 𝑒𝑒2 … en that are mutually orthogonal so that
𝑒𝑒𝑖𝑖 𝑒𝑒𝑗𝑗 = 0 for 𝑖𝑖 ≠ 𝑗𝑗
 The orthogonal eigenvectors of symmetric matrix are normalized
as :
𝑒𝑒�1 , 𝑒𝑒�2 , … . 𝑒𝑒�
𝑛𝑛
 The inner (scalar) product is
𝑒𝑒�𝑖𝑖 𝑇𝑇 𝑒𝑒�𝑗𝑗 = 𝛿𝛿𝑖𝑖𝑖𝑖 (𝑖𝑖, 𝑗𝑗 = 1,2, … 𝑛𝑛)
Example 4.7.1
Obtain the eigenvalues and corresponding orthogonal eigenvectors of
the symmetric matrix

2 2 0
𝐴𝐴 = 2 5 0
0 0 3
Terima Kasih | Thank You

You might also like