Matrices

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

INTRODUCTION TO

MATRICES

MS.B.S WIJERATHNE
APPLICATIONS OF MATRICES

• Robotics - matrices allow rotations, translations through planes to


be easily calculated
• Graphics/gaming – store (x,y) pairs of coordinates of
pixel/vertices in computer graphics
• Circuits-matrix arithmetic helps us calculate the electrical
properties of a circuit, with voltage, amperage, resistance, etc.
• Betting(Game Theory) - matrices allow complex betting
combinations without separate formulae such as multiple complex
simultaneous equations. 2
MATRIX

A rectangular arrangement of numbers in rows and columns

For example:

 6 2 − 1
− 2 0 5  2 rows

  2X3 3
3 columns
TYPES OF MATRICES

NAME DESCRIPTION EXAMPLE


Row matrix A matrix with only 1
row
3 2 1− 4
Column matrix A matrix with only I 2
column  
3
Square matrix A matrix with same
 2 4
number of rows and
 
columns  −1 7
Zero matrix A matrix with all zero
entries
0 0 
0 0 
  
Identity matrix A square matrix with 1 0 
1 in the diagonal 0 1 
  4
NAME DESCRIPTION EXAMPLE
Upper Triangular All the elements 1 2 3
matrix below diagonal are 0 5 6
zero 0 0 9
Lower Triangular All the elements 1 0 0
matrix above diagonal are 4 5 0
zero 7 8 9
Diagonal matrix All the elements 1 0 0
except diagonal are 0 5 0
zero 0 0 9

Symmetric matrix 𝑎𝑖𝑗 =𝑎𝑗𝑖 (A=𝐴𝑇 ) 1 2 3


2 4 5
3 5 7

5
Skew Symmetric matrix 𝑨𝑻 = - A 𝟎 𝟑 −𝟏
The elements on the −𝟑 𝟎 𝟐
diagonal of a skew 𝟏 −𝟐 𝟎
symmetric matrix are
zero
Orthogonal matrix A𝑨𝑻 = I (Identity matrix)

6
MATRIX OPERATIONS

7
ADDING MATRICES

Matrices of same dimension can be added

For Example:

 1   2  1 + 2   3 
− 5 + 3 = − 5 + 3 = − 2
       
 2  0  2 + 0   2 

8
SUBTRACTING MATRICES
Matrices of same dimension can be subtracted

For example:

6 2 2 − 5 6 − 2 2 − (−5)  4 7 
2 1  − 4 0  = 2 − 4 −  =
− 
     1 0   2 1 

9
PRODUCT OF TWO MATRICES
Example : suppose A is a 3  2 matrix, while B is a 2  4 matrix.
1) can the product AB be calculated?
Solution : the following diagram shows that ab can be calculated,
because the number of columns of a is equal to the number of rows of
b. (Both are 2.)

Matrix A Matrix B
32 24
must
match
size of AB
34
2) can BA be calculated?

Solution : the diagram below shows that BA cannot be calculated.


Matrix B Matrix A

24 32
different
MATRIX MULTIPLICATION-EXAMPLE
WITH STEPS
• TO FIND THE PRODUCT OF TWO MATRICES, SUCH AS

−6 4
 −3 4 2
A=  and −B =  2 3 ,
 5 0 4   
 3 − 2 
First locate row 1 of A and column 1 of B, shown shaded below.
−6 4
 −3 4 2  2 ,
A=  and − B = 3
 5 0 4   
 3 − 2 

Multiply corresponding elements, and find the sum of the


products.

−3( −6) + 4( 2) + 2(3) = 32


• This result is the element for row 1, column 1 of the product
matrix. Now use row 1 of A and column 2 of B to determine
the element in row 1, column 2 of the product matrix.

−6 4
 −3 4 2  
 5 0 4  2 3 − 3( 4) + 4(3) + 2( −2) = −4
  
 3 − 2 
Next, use row 2 of A and column 1 of B; this will give the row 2,
column 1 entry of the product matrix.
−6 4
 −3 4 2  
 5 0 4  2 3 5( −6) + 0( 2) + 4(3) = −18
  
 3 − 2 

Finally, use row 2 of A and column 2 of B to find the entry for row
2, column 2 of the product matrix.

−6 4
 −3 4 2  
 5 0 4  2 3 5( 4) + 0(3) + 4( −2) = 12
  
 3 − 2 
THE PRODUCT MATRIX CAN NOW BE WRITTEN.

−6 4
 −3 4 2    32 − 4
 5 0 4  2 3 =
    −18 12 
 3 − 2 
DETERMINANT OF 22 MATRIX
The determinant of a 22 matrix is the difference of
the entries on the diagonal.

a b
det  = ad − bc
c d 
17
EXAMPLE
Find the determinant of the matrix:

1 3
 
2 5
Solution:

1 3
 2 5 = 1(5) − 2(3) = 5 − 6 = −1
18
INVERSE MATRIX
To find the inverse determinant of the matrix
has to be non zero.(Non-singular matrix)

a b 
A= 
 c d 
−1 1  d − b
A = 
A − c a 
−1 1  d − b
A =
ad − cb − c a 
provided
ad − cb  0
19
EXAMPLE

Find the inverse of

 3 1
A = 
4 2

Solution:

  −1
     1
A −1 =
1 2 −1 1 2 −1 2
 =  = 3
6 − 4 −4 3  2 −4 3  −2 
 2
20
EXERCISE : FIND THE INVERSES OF FOLLOWING MATRICES

 2 4 1  3 − 4   1.5 − 2 
A =   A −1 =  = 
 1 3  2  − 1 2   − 0.5 1 
 5 10  1  2 − 10   0.1 − 0.5 
B =   B−1 =  = 
 − 1 2  20  1 5   0.05 0.25 

 3 2 1  1 − 2   −1 2 
C =   C −1 =  = 
 2 1  − 1  − 2 3   2 − 3 

 8 2 1  0 − 2   0 − 1
D =   D −1 =  = 
2  1 8   0.5 4 
 −1 0 
 2 − 8 E −1 cannot be found as det = 2  4 − (−1 −8) = 8 − 8 = 0
E =  
 − 1 4 
1  −1 0   −1 0 
 −1 0  F−1 =  = self inverting
F =   1  0 − 1  0 − 1
 0 − 1
GAUSSIAN ELIMINATION

22
ROW ECHELON FORM OF A MATRIX

23
ELEMENTARY ROW OPERATIONS

1. Interchange any two rows, “interchange the 𝑖 𝑡ℎ and


𝑗 𝑡ℎ rows”
2. Multiply every element in a row by a nonzero constant,
say “multiply the 𝑘 𝑡ℎ row by 𝑐 ≠ 0”.
3. Add elements of one row to corresponding elements of
another row. Say “replace the 𝑘 𝑡ℎ row by 𝑘 𝑡ℎ row plus
𝑐 times the 𝑗 𝑡ℎ row”
25
26
27

You might also like