0% found this document useful (0 votes)
50 views19 pages

Matrices

The document introduces the concept of matrices and provides examples of operations that can be performed with matrices, including: - Adding and subtracting matrices - Multiplying matrices - Finding the determinant of a matrix - Calculating the inverse of a matrix - Using the inverse matrix to solve systems of simultaneous equations The key aspects covered are the definitions and notation used for matrices, as well as common matrix operations like addition, subtraction, and multiplication. Examples are provided to demonstrate how to perform these operations on matrices of various sizes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views19 pages

Matrices

The document introduces the concept of matrices and provides examples of operations that can be performed with matrices, including: - Adding and subtracting matrices - Multiplying matrices - Finding the determinant of a matrix - Calculating the inverse of a matrix - Using the inverse matrix to solve systems of simultaneous equations The key aspects covered are the definitions and notation used for matrices, as well as common matrix operations like addition, subtraction, and multiplication. Examples are provided to demonstrate how to perform these operations on matrices of various sizes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Matrices

Concept:

Let us now introduce the concept of a matrix. Consider a set of scalar


quantities arranged in a rectangular array containing m rows and n columns:

Matrices are conventionally identified by bold uppercase letters such as A,


B, etc. The entries of matrix A may be denoted as Ai j or ai j , according to the
intended use. Occasionally we shall use the short-hand component notation:

𝐴 = [𝑎𝑖𝑗 ]

Ex.: The following is a 2 × 3 numerical matrix:


𝟐 𝟔 𝟑
𝑩= [ ]
𝟒 𝟗 𝟏
This matrix has 2 rows and 3 columns. The first row is (2, 6, 3), the second row is
(4, 9, 1), the first column is (2, 4), and so on.

0
The determinant of matrix:
The determinant of a matrix is a scalar value that is used in many matrix
operations. The matrix must be square (equal number of columns and rows) to
have a determinant. The notation for absolute value is used to indicate "the
𝑎 𝑏
determinant of", e.g. |𝑨| means "the determinant of matrix A" and | | means
𝑐 𝑑
to take the determinant of the enclosed matrix. Methods for finding the determinant
vary depending on the size of the matrix.

The determinant of a 2×2 matrix is simply:

𝑎 𝑏 a b
where 𝐴 = [ ], det(A) = |A| = | | = ad - bc
𝑐 𝑑 c d

The determinant of a 3×3 matrix can be calculated by repeating the first


two columns as shown below.

A=

|𝐀| = a11a22a33 + a12a23a31 + a13a21a32 - a13a22a31 - a11a23a32 - a12a21a33

1
The determinant of a 3×3 matrix can be calculated by the following
process:
𝐚𝟏𝟏 𝐚𝟏𝟐 𝐚𝟏𝟑
𝐀 = [𝐚𝟐𝟏 𝐚𝟐𝟐 𝐚𝟐𝟑 ]
𝐚𝟑𝟏 𝐚𝟑𝟐 𝐚𝟑𝟑

|𝐀| = a11(a22a33 - a23a32) - a12(a21a33 - a23a31) + a13(a21a32 - a22a31)

Ex.: Find the determinant of the following matrix:


𝟐 𝟏 𝟔
𝑨 = [ 𝟎 𝟐 𝟑]
−𝟏 𝟎 𝟓

Solution:
First method:
𝟐 𝟏 𝟔 𝟐 𝟏
|𝐀| = | 𝟎 𝟐 𝟑| 𝟎 𝟐
−𝟏 𝟎 𝟓 −𝟏 𝟎

- - - + + +

|𝐀| = (2*2*5) + (1*3*-1) + (6*0*0) - (6*2*-1) - (2*3*0) - (1*0*5)


|𝐀| = 20 - 3 + 12 = 29
Second method:
|𝐀| = 2(2*5 - 3*0) - 1(0*5 - 3*-1) + 6(0 - 2*-1)
= 20 - 3 + 12 = 29
H.W.:
Q) Find the determinant of the following matrix:
𝟐 𝟏 𝟒
A = [𝟓 𝟐 𝟑]
𝟖 𝟕 𝟑

2
Matrices addition and subtraction:
𝑎 𝑏 𝑒 𝑓
For example purposes, let A = [ ] and B = [ ]
𝑐 𝑑 𝑔 ℎ
𝑎±𝑒 𝑏±𝑓
then A ± B = [ ]
𝑐±𝑔 𝑑±ℎ

Ex.: Find addition and subtraction between A and B of the following matrices:
𝟓 −𝟐 𝟐 −𝟐
𝐀 = [−𝟏 𝟑 ] and 𝐁 = [𝟎 𝟏 ]
𝟏 𝟎 𝟒 −𝟏

Solution:
𝟓 −𝟐 𝟐 −𝟐 𝟕 −𝟒
A + B = [−𝟏 𝟑 ] + [𝟎 𝟏 ] = [−𝟏 𝟒]
𝟏 𝟎 𝟒 −𝟏 𝟓 −𝟏
𝟓 −𝟐 𝟐 −𝟐 𝟑 𝟎
A - B = [−𝟏 𝟑 ] − [𝟎 𝟏 ] = [−𝟏 𝟐]
𝟏 𝟎 𝟒 −𝟏 −𝟑 𝟏

H.W.:
Q) Find addition and subtraction between A and B of the following matrices:
𝟏 𝟏. 𝟓 𝟐 𝟏 𝟏 −𝟏
𝐀 = [𝟎 −𝟎. 𝟓 𝟏 ] and 𝐁 = [−𝟐 𝟐 𝟐 ]
𝟏 𝟐. 𝟓 −𝟑 −𝟏 𝟐 𝟏

3
Matrix by Matrix Product:
We now pass to the most general matrix-by-matrix product, and consider the
operations involved in computing the product C of two matrices A and B:
C = AB

Let A be a 1 × 2 row matrix and B be a 2 × 1 column matrix:


𝒄
𝐀 = [𝐚 𝐛] and B = [ ]
𝒅
The product of these two matrices is written AB and is the 1 × 1 matrix
defined by:

AB = [𝒂𝒄 + 𝒃𝒅]

𝟔
For example: 1. 𝐀 = [𝟐 −𝟑] and B = [ ]
𝟓
AB = [𝟏𝟐 − 𝟏𝟓] = [−𝟑]

𝟑
2. 𝐀 = [𝟐 𝟑
−𝟒 𝟑 𝟐] and B = [−𝟐]
𝟓
AB = [𝟔 − 𝟏𝟐 − 𝟔 + 𝟏𝟎] = [−𝟐]

4
Multiplying two 2×2 matrices:
If A and B are two matrices then the product AB is obtained by multiplying
the rows of A with the columns of B in the manner described above.

Ex.: Find the product AB where:


𝟏 𝟐 𝟏 −𝟏
𝐀= [ ] and 𝐁 = [ ]
𝟑 𝟒 −𝟐 𝟏

Solution:
𝟏 𝟐 𝟏 −𝟏 −𝟑 𝟏
𝑪=𝑨×𝑩 = [ ]× [ ]= [ ]
𝟑 𝟒 −𝟐 𝟏 −𝟓 𝟏

H.W.:
Q) 1. Find the product AB where:
𝟏 𝟏 𝟏 −𝟏
𝐀= [ ] and 𝐁 = [ ]
𝟏 𝟏 −𝟏 𝟏

𝐚 𝐛 𝟏 𝟎
2. 𝐀 = [ ] and 𝐁 = [ ]
𝐜 𝐝 𝟎 𝟏

5
Multiplying two 3×3 matrices:
The definition of the product C = AB where A and B are two 3 × 3 matrices
is as follows:

Ex.: Find the product AB where:


𝟏 𝟐 −𝟏 𝟐 −𝟏 𝟑
𝐀 = [𝟑 𝟒 𝟎] and 𝐁 = [𝟏 −𝟐 𝟏 ]
𝟏 𝟓 −𝟐 𝟎 𝟑 −𝟐

Solution:
𝟏 𝟐 −𝟏 𝟐 −𝟏 𝟑 𝟒 −𝟖 𝟕
𝑪 = 𝑨 × 𝑩 = [𝟑 𝟒 𝟎 ] × [𝟏 −𝟐 𝟏 ] = [𝟏𝟎 −𝟏𝟏 𝟏𝟑]
𝟏 𝟓 −𝟐 𝟎 𝟑 −𝟐 𝟕 −𝟏𝟕 𝟏𝟐

H.W.:

Q) Find the product AB where:


𝟑 𝟑 𝟑 𝟗𝟎𝟎 𝟏𝟏𝟎𝟎
𝐀= [𝟏 𝟏 𝟏. 𝟓] and 𝐁 = [𝟏𝟐𝟎𝟎 𝟏𝟓𝟎𝟎]
𝟏𝟎 𝟏𝟒 𝟏𝟗 𝟔𝟓𝟎 𝟕𝟓𝟎

6
Inverse of Matrix:
We must be follow the following steps to calculate inverse matrix:
1. Calculate determinant of matrix.
2. Minors of matrix.
3. Cofactor of matrix (-1)i+jaaij
4. Adjoint matrix (adj) (Transpose of cofactor)
𝑎𝑑𝑗𝐴
5. A-1 = |𝐴|

Ex.: Calculate inverse matrix of the following matrix:


−𝟏 𝟏 𝟐
A = [ 𝟑 −𝟏 𝟏]
−𝟏 𝟑 𝟒

Solution:
|𝑨| = −𝟏(−𝟒 − 𝟑) − (𝟏𝟐 + 𝟏) + 𝟐(𝟗 − 𝟏) = 𝟕 − 𝟏𝟑 + 𝟏𝟔 = 𝟏𝟎

−𝟕 𝟏𝟑 𝟖
Minors of Matrix A = [−𝟐 −𝟐 −𝟐]
𝟑 −𝟕 −𝟐
−𝟕 −𝟏𝟑 𝟖
Cofactor matrix = [ 𝟐 −𝟐 𝟐]
𝟑 𝟕 −𝟐

−𝟕 𝟐 𝟑
Adjoint matrix = [−𝟏𝟑 −𝟐 𝟕 ]
𝟖 𝟐 −𝟐

−𝟕 𝟐 𝟑
[−𝟏𝟑 −𝟐 𝟕] −𝟎. 𝟕 𝟎. 𝟐 𝟎. 𝟑
-1 𝑨𝒅𝒋𝒐𝒊𝒏𝒕 𝒎𝒂𝒕𝒓𝒊𝒙 𝟖 𝟐 −𝟐
A = |𝑨|
= = [−𝟏. 𝟑 −𝟎. 𝟐 𝟎. 𝟕 ]
𝟏𝟎
𝟎. 𝟖 𝟎. 𝟐 −𝟎. 𝟐

7
H.w.:
Q) Calculate inverse matrix of the following matrix:

𝟏 𝟑 𝟑
A = [𝟏 𝟒 𝟑]
𝟐 𝟕 𝟕

Solving simultaneous equations using the inverse matrix:

Matrix algebra allows us to write the solution of the system using the inverse
matrix of the coefficients. In practice the method is suitable only for small systems.
Its main use is the theoretical insight into such problems which it provides.

AX= B
X = A-1B

X = variables
A = matrix of coefficient variables
B = matrix of constant

8
Ex.: Solve the following equations using matrix methods:
x1 - 2x2 + x3 = 3
2x1 + x2 - x3 = 5
3x1 - x2 + 2x3 = 12

Solution:
AX = B
X = A-1B
𝟏 −𝟐 𝟏 𝐱 𝟏 𝟑
𝐱
[𝟐 𝟏 −𝟏] [ 𝟐 ] = [ 𝟓 ]
𝟑 −𝟏 𝟐 𝐱 𝟑 𝟏𝟐
𝐱𝟏 𝟏 −𝟐 𝟏 −𝟏 𝟑
[𝐱 𝟐 ] = [𝟐 𝟏 −𝟏] [ 𝟓 ]
𝐱𝟑 𝟑 −𝟏 𝟐 𝟏𝟐
𝟏 −𝟐 𝟏 −𝟏 𝟎. 𝟏 𝟎. 𝟑 𝟎. 𝟏
A-1 = [𝟐 𝟏 −𝟏] = [−𝟎. 𝟕 −𝟎. 𝟏 𝟎. 𝟑]
𝟑 −𝟏 𝟐 −𝟎. 𝟓 −𝟎. 𝟓 𝟎. 𝟓
𝐱𝟏 𝟎. 𝟏 𝟎. 𝟑 𝟎. 𝟏 𝟑
𝐱
[ 𝟐 ] = [−𝟎. 𝟕 −𝟎. 𝟏 𝟎. 𝟑] [ 𝟓 ]
𝐱𝟑 −𝟎. 𝟓 −𝟎. 𝟓 𝟎. 𝟓 𝟏𝟐
x1 = 3
x2 = 1
x3 = 2
H.W.:
Q) Solve the following equations using matrix methods:
2 x1 + x2 - x3 = 0
x1 + x3 = 4
x1 + x2 + x3 = 0

9
Eigen values and Eigenvectors

Given a square matrix A , to determine the scalars  and the nonzero


column matrix x which simultaneously satisfy the equation ;

Ax=λx …. (1)

is known as the Eigen value problem ( eigen in German means proper ) . The
solution of this problem is intimately connected to the question of whether
the matrix can be transformed into a diagonal form .

The value  is called the Eigen value ( characteristic value ) and the
corresponding column matrix x is called the eigenvector ( characteristic
vector ) .

If A is a n × n matrix , Equation (1) is given by ;

 a 11 a12  a1n   x 1   x1 
    
 a 21 a22  a2 n   x 2   x2 
   =  
         
a am 2  amn   x n  x 
 m1  n

 x1  1 0  0   x 1 
   
x  0 1  0  x2 
Since ,  2  =          =  I X

    
x   0 0 1   x 
 n    n 

where I is the unit matrix , we can write Equation (1) as ;

(A–λI)x=0 …. (2)

This system has nontrivial solutions if and only if the determinant of the

10
Coefficient matrix vanishes;

a11 −  a12  a1n


a21 a22 −   a2 n
= 0
   
an1 an 2  ann − 

The expansion of this determinant yields a polynomial of degree


n in λ , which is called characteristic polynomial P(λ).

The equation ; P ( λ ) = | A – λ I | = 0 , is known as the characteristic


equation ( or secular equation ) . Its n roots are the Eigen values and
will be denoted λ 1, λ 2 ,λ 3 , ….. , λ n . They may be real or
complex , when one of the Eigen values is substituted back into
Equation (2) , the corresponding eigenvector x ( x 1 , x 2 , x 3 , ….. , x n ) may be
determined . Note that the eigenvectors may be multiplied by any constant
and remain a solution of the equation .

► If n Eigen values are all different , we will have n distinct eigenvectors .

► If two or more Eigen values are the same , we say that they are degenerate
.

In some problems , a degenerate Eigen value may produce only one


eigenvector , in other problems a degenerate Eigen value may produce more
than one distinct eigenvectors .

11
1 2
Example (2) : Find the Eigen values and Eigenvectors of A , if A =  
2 1

Solution :

The characteristic polynomial of A is :

1−  2
P( ) = = 2 − 2 − 3
2 1− 

And the secular equation is :

 2 − 2  − 3 = (  + 1) (  − 3 ) = 0

Thus , the Eigen values are : 1 = −1 and  2 = 3 .

x 
be x 1 =   then
11
Let the eigenvector x 1 corresponding to 1 = −1
 x12 
x 1 must Satisfy :

1 −  1 2   x 11   2 2   x11 
    = 0      = 0
 2 1 −  1   12 
x  2 2   x12 

This reduces to : 2 x 11 + 2 x 12 = 0

Thus for this eigenvector x 11 = − x 12 . That is , x 11 : x 12 =–1:1

Therefore , the eigenvector can be written as :

 −1 
x 1 =  
 1

12
Any constant , positive or negative , times it will also be a solution , but it
will not be regarded as another distinct eigenvector . With a similar
procedure , we find the eigenvector corresponding to to be :  2 = 3

 x 21  1
x 2 =  =

 
x
 22  1

 3 − 5
Example (3) : Find the Eigen values and Eigenvectors of A , if A =   .
1 − 1 

Solution:

The characteristic polynomial of A is :

3−  −5
P( ) = = 2 − 2 + 2
1 − 1− 

So the secular equation is :

2 − 2 + 2 = 0

Thus , the Eigen values are :

 2 − 2  + 2 = 0  1, 2 = 1  i

x 
Let  1 = 1+ i , and the corresponding eigenvector be x 1 =   , then x 1
11

 x12 
must satisfy :

3 − ( 1 + i ) − 5   x11 
    = 0
 1 − 1 − ( 1 + i )   x12 

13
which gives;

( 2 − i ) x11 − 5 x12 = 0 …. (1)

x11 − ( 2 + i ) x12 = 0 …. (2)

Equation (1) gives:

5 5 2+i 5( 2 +i ) 2+i
x11 = x12 =  x12 = x12 = x12
2−i 2−i 2+i 5 1

which is the same result from Equation (2) , as it should be . Therefore , x 1


can be written as :

 x 11   2 + i 
= = 
x1  x   1 
 12 

Similarly , for  2 = 1 − i , the corresponding eigenvector is :

 x 21   2 − i 
x 2 =  = 
  1 
 x 2 2 

Example (4) : Find the Eigen values and Eigenvectors of A , if


 − 2 2 − 3
A =  2 1 − 6
 − 1 − 2 0 

Solution:

The characteristic polynomial of A is:

x.( A − I ) = 0

14
1 0 0 
Where: I = 0 1 0
0 0 1

 − 2 2 − 3   0 0  − 2 −  2 − 3
A − I =  2 1 − 6 −  0  0  =  2
 1 −  − 6 
 − 1 − 2 0   0 0    − 1 − 2 −  

−2− 2 −3
P ( ) = 2 1−  − 6 = (−2 −  )  (1 −  )  (− ) − 12 − 2  2  (− ) + 6 − 3  − 4 − (1 −  ) = 0
−1 −2 −

= 2 − 22 + 24 + 2 − 3 + 12 + 4 + 12 + 9 + 3 = 0
= −3 − 2 + 21 + 45 = 0

Trail & Error to find root one to satisfy the result:

Take  = 1 : − 13 − 12 + 21 + 45  0

Take  = −3 : − (−3) 3 − (−3) 2 + 21  (−3) + 45 = 0

-1 -1 24 45

-3 0 3 -6 -45

-1 2 15 0

15
( + 3)(−2 + 2 + 15) = 0

Thus, the Eigen values for A are:

1 = − 3
2 = 5
3 = − 3

• At  2 = 5

− 2 −  2 − 3   x1  − 2 − 5 2 − 3  x1  − 7 2 − 3  x1  0
=  2 1 −  − 6    x2  =  2 1 − 5 − 6   x2  =  2 − 4 − 6   x2  0
 − 1 − 2 −    x3   − 1 − 2 − 5  x3   − 1 − 2 − 5  x3  0

-7 x1 +2 x 2 -3 x3 =0 …..(1)

2 x1 - 4 x 2 -6 x3 =0 …..(2)

- x1 -2 x 2 -5 x3 =0 …..(3)

From Eq.(2)

2 x1 - 4 x 2 -6 x3 =0

x1 = 2 x 2 +3 x3 ……(4)

Sub. Eq.(4) within Eq.(3) we obtain

x2 −4 x1 −1
= ….(5) Sub. Eq.(5) within Eq.(1) we obtain =
x3 1 x3 1

• At  3 = − 3

16
− 2 −  2 − 3   x1  − 2 + 3 2 − 3  x1   1 2 − 3  x1  0
=  2 1 −  − 6    x2  =  2 1 + 3 − 6   x2  =  2 4 − 6   x2  0
 − 1 − 2 −    x3   − 1 −2 3   x3  − 1 − 2 3   x3  0
x1 +2 x 2 -3 x3 =0 …..(1)

2 x1 +4 x 2 -6 x3 =0 …..(2)

- x1 -2 x 2 +3 x3 =0 …..(3)

From Eq.(1)

x1 = -2 x 2 +3 x3 ……(4)

Sub. Eq.(4) within Eq.(2) we obtain

2(-2 x 2 +3 x3 )+4 x 2 -6 x3 =0

-4 x 2 +6 x3 +4 x 2 -6 x3 =0 No Solution

Sub. Eq.(4) within Eq.(3) we obtain

-(-2 x 2 +3 x3 )-2 x 2 +3 x3 =0

2 x 2 -3 x3 -2 x 2 +3 x3 =0 No Solution

Eq.(4)

x1 = -2 x 2 +3 x3

Let: x 2 =0 , x3 =1/3

x1 =1

17
0 1 1 
Example (5) : Find the Eigen values and Eigenvectors of A , if A = 1 0 1
1 1 0

Solution:
The characteristic polynomial of A is:
1 0 0 
x.( A − I ) = 0 Where: I = 0 1 0
0 0 1

0 1 1   0 0  −  1 1 
A − I = 1 0 1 −  0  0  =  1 − 1 
 
1 1 0  0 0    1 1 −  

− 1 1
P ( ) = 1 − 1 = 3 − 3 − 2 = 0
1 1 −

Trail & Error to find root one to satisfy the result: Take  = −1 : (−1) 3 − 3(−1) − 2 = 0

1 0 -3 -2
-1 0 -1 1 2
1 -1 -2 0

( + 1)(2 −  − 2) = 0

Thus, the Eigen values for A are:

1 = − 1
2 = − 1
3 = 2

18

You might also like