0% found this document useful (0 votes)
15 views

Matrix

Uploaded by

abduh
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)
15 views

Matrix

Uploaded by

abduh
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/ 45

the Operation

Matrix
Matrix algebra is a means of making
calculations upon arrays of numbers (or data).

a11 ,, a1n 


a 21 ,, a 2n 
A    Aij 
   
 
am1 ,, amn 
Why use it?
 Matrix algebra makes mathematical
expression and computation easier.
 It allows you to get rid of cumbersome
notation, concentrate on the concepts
involved and understand where your results
come from.
Scalar
a scalar is a number

 (denoted with
regular type: 1 or 22)
Row Vector

[1 x n] matrix

A a1 a 2 ,, an  aj


Column Vector
[m x 1] matrix

a1 
a 2 
A     ai
 
 
 am 
Square Matrix
Same number of rows and columns

5 4 7
B  3 6 1 
 
2 1 3 
The
Identity
Identity Matrix
Square matrix with ones on the
diagonal and zeros elsewhere.

1 0 0 0 
0 1 0 0 
I  
0 0 1 0 
 
0 0 0 1
Transpose Matrix
Rows become columns and
columns become rows

a11 a 21 ,, am1 


a12 a 22 ,, am 2 
A'  
     
 
a1n a 2n ,, amn 
The Transpose of a Matrix

 A is the m×n matrix given by


 a11 a12  a1n 
a a22  a2 n 
A 21 .
    
 
 m1 m 2
a a  a mn 

 The transpose matrix of A, denoted by AT, is a n×m


matrix given by
 a11 a21  am1 
a a  a 
A   12 22
T m2 
,
   
 
 1n 2 n
a a  a mn 
Matrix Addition and
Subtraction

A new matrix C may be defined as the


additive combination of matrices A and B
where: C = A + B
is defined by:

Cij  Aij  Bij


Note: all three matrices are of the same dimension
Addition
a11 a12 
A 
If 
a 21 a 22 


b11 b12 
and B 

b 21 b 22


a11  b11 a12  b12 


then C 

a 21  b 21 a 22  b22 

Matrix Addition Example

3 4  1 2  4 6 


A  B     C
  
5 6  3 4 
 
8 10 

Matrix Subtraction

C = A - B
Is defined by

Cij  Aij  Bij


Matrix Multiplication
Matrices A and B have these dimensions:

[r x c] and [s x d]
Matrix Multiplication
Matrices A and B can be multiplied if:

[r x c] and [s x d]

c=s
Matrix Multiplication

The resulting matrix will have the dimensions:

[r x c] and [s x d]

rxd
Matrix Multiplication
 Thus a11 a12 a13   b11 b12  c11 c12 
a a a  x b b   c c 
 21 22 23   21 22   21 22 
a31 a32 a33  b31 b32  c31 c32 

 where
c11  a11b11  a12b21  a13b31
c12  a11b12  a12b22  a13b32
c 21  a21b11  a22b21  a23b31
c 22  a21b12  a22b22  a23b32
c31  a31b11  a32b21  a33b31
c32  a31b12  a32b22  a33b32
Computation: A x B = C

2 3
1 1 1 
A  1 1  and B 


1 0 2 

 
1 0 
[3 x 2] [2 x 3]
A and B can be multiplied

2 *1  3 *1  5 2 *1  3 * 0  2 2 *1  3 * 2  8 5 2 8
C  1*1  1*1  2 1*1  1* 0  1 1*1  1* 2  3   2 1 3 
1*1  0 *1  1 1*1  0 * 0  1 1*1  0 * 2  1  111 

[3 x 3]
Computation: A x B = C

2 3
1 1 1 
A  1 1  and B 


1 0 2 

 
1 0 
[3 x 2] [2 x 3]
Result is 3 x 3

2 *1  3 *1  5 2 *1  3 * 0  2 2 *1  3 * 2  8 5 2 8
C  1*1  1*1  2 1*1  1* 0  1 1*1  1* 2  3   2 1 3 
1*1  0 *1  1 1*1  0 * 0  1 1*1  0 * 2  1  111 

[3 x 3]
Inversion
Matrix Inversion

1 1
B B  BB  I

Like a reciprocal Like the number one


in scalar math in scalar math
Definition
 The inverse of an n by n matrix A is an n by n
matrix B where,
AB = BA = In.
 Please note: Not all matrices have inverses!
Singular matrices don’t have inverse.
 If a matrix has an inverse, then it is called
invertible.
Definition
If A is a square matrix, and if a matrix B of
the same size can be found such that
AB=BA=I , then A is said to be invertible
and B is called an inverse of A . If no such
matrix B can be found, then A is said to be
singular .

Notation:

B  A1
Properties of Matrix Inverse

 If A is an invertible matrix then its inverse is unique.


 (A-1)-1 = A.
 (Ak)-1= (A-1)k (we will denote this as A-k )
 (cA)-1 = (1/c)A-1, c ≠ 0.
 ( AT)-1 = (A-1)T.
 If A is an invertible matrix, then the system of equations
Ax = b has a unique solution given by x = A-1b.
The inverse of a 2-by-2 matrix

 For a 2-by-2 matrix,

a b 
A 
c d 

1 1  d  b
A   
ad  bc  c a 
The inverse of a 2 x 2 matrix
 From this we deduced that a 2x2 matrix A is
singular if and only if ad-bc = 0.
 This quantity (ad-bc) has some other useful
properties as well and so is defined to be the
determinant of the matrix A.
Determinants of larger
matrices
 There is no “nice” formula for the inverse of larger than
2x2 matrices.
 We still can define the determinant of a larger square
matrix and it will still have the property that the
determinant of A= 0 if and only if A is singular.
 First we need some terminology.
Minors and cofactors
 If A is a square matrix, then the minor Mij of the element
aij of A is the determinant of the matrix obtained by
deleting the i-th row and the j-th column from A.
 The cofactor Cij = (-1)i+jMij.
Definition of a Determinant
If A is a square matrix of order 2 or greater, then the
determinant of A is the sum of the entries in the first
row of A multiplied by their cofactors. That is,

n
det( A)  A   a1 j C1 j
j 1
Determinant of 2-by-2 Matrix

a b
A 
c d

det( A)  A  ad  bc
Determinant of 3-by-3 Matrix

a b c
A   d e f 
 g h i 

e f d f d e
det( A)  A  a b c
h i g i g h
 aei  afh  bdi  cdh  bfg  ceg
 (aei  bfg  cdh)  ( gec  hfa  idb)
Matrix Inversion
How to calculate the matrix inverse?

1 1
A  adj ( A)
A

What is an adjoint matrix?


Adjoint Matrix – Minors and
Cofactors

 The adjoint matrix of [A], Adj[A] is obtained by taking


the transpose of the cofactor matrix of [A].

 The minor for element aij of matrix [A] is found by


removing the ith row and jth column from [A] and then
calculating the determinant of the remaining matrix.
Matrix Inversion
Consider the following set of linear equations.

 2 x1  4 x2  5 x3  36

-3 x1  5 x2  7 x3  7
5 x  3 x  8 x  -31
 1 2 3

The coefficients can be arranged in a matrix form as shown.

 2 -4 5 
-3 5 7 
  
A  
 5 3 -8
Matrix Inversion
The set of equations in matrix form is:

 2 -4 5   x1   36 
 -3 5 7   x    7 
  2  
 5 3 -8  x3   -31

𝐴 𝑥=𝐵
−1
𝑥= 𝐴 𝐵
Minors
 2 4 5  5 7
 3 5 7 
 M 11 = = -61
 5 3  8 3 -8

 2 4 5 
 3 -3 7
 5 7 
M 12 = = -11
 5 3  8 5 -8

 2 4 5  -3 5
 3 5 7  M 13 = = -34
 5 3
 5 3  8
Minors
 2 4 5 
 3 5  2 -4
 7  M 23   26
 5 3  8 5 3

The resulting matrix of minors is:

 -61 -11 -34 


 17 -41 26 
  
M  
-53 29 -2 
Cofactors
Cofactors are the signed minors.
i+ j
The cofactor of element aij of matrix [A] is: C ij = (-1) M ij
1+ 1
Therefore C 11 = (-1) M 11
1+ 2
C 12 = (-1) M 12
1+ 3
C 13 = (-1) M 13
 -61 11 -34 
 
The resulting matrix of cofactors is: C   -17 -41 -26 
 -53 -29 -2 
Adjoint matrix
The adjoint matrix of [A], Adj[A] is obtained by taking the
T
transpose of the cofactor matrix of [A]. adj [A ]= [C ]

 -61 11 -34   -61 -17 -53


 11 -41 -29 

C   -17 -41 -26  adj   
A  
 -53 -29 -2  -34 -26 -2 

2 -4 5
Evaluate the determinant A = -3 5 7 = -336
5 3 -8
- 1 1
[A ] = adj [A ]
Matrix Inversion A

 -61 -17 -53


1  
 A
1
 11 -41 -29
-336  
-34 -26 -2 

 -61 -17 -53   61 17 53 


 -336 -336   336

-336
 336 336 
 
 A  11 -41 -29 

1 -11 41 29 
 A
1

 -336 -336 -336   336 336 336 
   
 -34 -26 -2   17 13 1 
 -336 -336 -336   168 168 168 
If the original square matrix, A, is given by the following expression:

2 1 0
A   1 2  1
 
 0 1 2 

Then, after augmenting by the


identity, the following is obtained:

2 1 0 1 0 0
A I    1 2 1 0 1 0
 
 0 1 2 0 0 1
By performing elementary row operations on the [AI] matrix until
A reaches reduced row echelon form, the following is the final result:

 3 1 1
1 0 0 4 2 4
 1
I A1   0 1 0
1
1 
0 0 1
2 2
 1 1 3
 4 2 4 

The matrix augmentation can now be undone, which gives the following:

3 1 1
1 0 0 4 2 4
I  0 0
1 1
1 A1  1 
  2 2
1 1 3
0 0 1  4 2 4 

You might also like