Professional Documents
Culture Documents
Matrices
p
Matrix: A square or rectangular array of numbers or
functions that obey certain laws, as in the case of
determinants, the numbers or functions in a matrix
are called elements, and these elements are
distinguished by two subscripts having the same
indication as the two subscripts of an element in a
determinant.
If a matrix A has m rows and n columns it is written
in the form
A=
a11 a12
a21 a 22
a1 n
a2 n
a m 1 a m2 a mn
(1)
m=n
m n
(m
aij =b ij
i j
. This of
matrices is defined as
C=A B
(2)
Example 1
Given the matrices
7 4 3
B= 2 5 6
1
3 2
Find
2 1 3
A= 4 5 1
6 2 3
A + BB A .
Solution:
2
Dr. Abdalsattar.K.Hashim
2+ 7 14 3+3
A + B= 42 5+5 1+6
6+1 2+3 3+ 2
9 5 6
A + B= 2 10 7
7 5 5
72 4+ 1 33
B A= 24 55 61
16
32 23
5 3 0
B A= 6 0
5
5 1 1
c) Multiplication
The multiplication of matrix A by a scalar quantity
is defined by
A=( A )
(3)
(4)
A B.
C=AB
following definition
3
Dr. Abdalsattar.K.Hashim
Cij = aik b kj
(5)
k=1
Note
defined
conformable
for
that
the
matrix
matrices
m s , s nm n ,
product
only .
is
This
( )
0 1
Given that 1= 1 0
1 0
and 3 = 0 1
Find 1 3
Solution:
( )(
1 3= 0 1 1 0
1 0 0 1
( 0 )( 1 ) + ( 1 ) (0) ( 0 )( 0 )+ ( 1 ) (1)
( 1 ) ( 1 ) + ( 0 ) (0) (1 ) ( 0 ) + ( 0 ) (1)
1 3= 0 1
1 0
(m s )
matrix and B an
where C
A B=C
is an (mn sr ) matrix.
4
Dr. Abdalsattar.K.Hashim
If
B=
a 11 b11
a11 b 21
a b
A B= 21 11
a21 b 21
a31 b11
a31 b 21
a11 b12
a11 b 22
a21 b12
a21 b22
a31 b 12
a31 b 22
b11 b 12
b21 b 22
then
a 12 b11
a12 b21
a 22 b11
a22 b21
a 32 b11
a32 b21
a12 b12
a12 b22
a22 b12
a22 b22
a32 b12
a32 b22
a13 b 11
a 13 b21
a23 b 11
a 23 b21
a33 b 11
a 33 b21
a13 b 12
a13 b 22
a23 b 12
a23 b 22
a33 b 12
a33 b 22
Example 3.
( )
0 1
Given that 1= 1 0
1 0
and 3 = 0 1
Find 1 3
Solution:
( ) (
1 3= 0 1 1 0
1 0
0 1
0 3 1 3
1 3 0 3
0
0
1 3=
1
0
0 1 0
0 0 1
0
0 0
1 0 0
d Division
0
1
x
) (
ln x+ c 1
c2
e + c3
1
0 ex
3
dx= x
x
+c 4 x+ c5 3 x+ c6
2
x 1 3
3
x
)(
ln x c 2 e
c 0 c3
x3
+ 1
x 3 x c 4 c5 c 6
3
g) Transpose of a matrix
A new matrix
AT
is constructed by interchanging
A= 2 1 3
4 2 1
6
Dr. Abdalsattar.K.Hashim
( )
2 4
A T = 1 2
3 1
Example 7.
T
T
T
Show that ( AB) =B A
Solution:
T
T
T
T
B ik A kj =( B A )ij
k
then
( AB )T =BT AT
3. Special matrices
A number of matrices are of special interest and
take special forms
(i) The row Matrix
A=(a11 a12a 1n )
7
Dr. Abdalsattar.K.Hashim
a11
a21
A=
a n1
()
aij =0
for all
i j
For example
( )
0 0 0
0= 0 0 0
0 0 0
A +0=A
and the
property
0 A= A 0=0
ij
( )
1 0 0
1= 0 1 0
0 0 1
A 1=1 A
matrix is
diagonal then
a 11 0
0
A= 0 a 22 0
0
0 a33
2 1 3
A= 1 5
6
3
6 7
Is symmetric since
2 1 3
A = 1 5
6
3
6 7
T
4. Trace
One of the interesting properties of the square
matrices is that the trace of a product of two such
9
Dr. Abdalsattar.K.Hashim
matrices
is
independent
multiplication.
of
the
order
of
Trace ( AB )= ( AB)ii
i
aij b ji
i
b ji a ij
j
(BA) jj
j
Trace ( BA )
( )
1 2 3
A= 3 1 2
1 3 2
2 4 3
B= 1 2 3
2
1
3
Show that
)
Trace AB=Trace BA
Solution:
( )(
1 2 3 2 4 3
AB= 3 1 2 1 2 3
1 3 2 2
1
3
6 3
6
9 8 12
3 4
0
)
10
Dr. Abdalsattar.K.Hashim
)( )
2 4 3 1 2 3
BA= 1 2 3 3 1 2
2
1
3 1 3 2
7 9
4
2 9 5
8 14 14
Trace AB=Trace BA
AB BA
5. Matrix Inversion
Consider a square matrix A to be known. Provided
that the matrix is nonsingular matrix the problem is
to find its inverse
1
A1
such that
A A = A A=1
a ij c ij= a ji c ji=| A|
i
| A|
Where
c ij
is the cofactor of
a ij c ik = a ji c ki =0
i
11
Dr. Abdalsattar.K.Hashim
a ij c ik
i
jth
column is
kth
jth
column and
a ij c ik = a ji c ki =0
i
a ij c ik = a ji c ki = jk| A|
i
A A =1
The element
( A A 1 )ij = Aik A1
kj
k
ij= A ik A1
kj
k
c i l ij = A ik c i l A1
kj
i
12
Dr. Abdalsattar.K.Hashim
c j l=|A| k l A1
kj
k
c j l=|A| A1
lj
A1
lj =
c jl
| A|
(7)
A CT
| A|
A
Where
CT
3 4 1
2 1 3
2 3 1
Solution:
| | | | |
| | | | | |
| | | | | |
+1
3
A C= 4
3
+4
1
3
1
1
1
1
3
2 3
2 1
+ 3 1
2 1
3 1
2 3
10
4
8
A C = 1 5 17
13 11 5
+ 2
2
3
2
+3
2
1
3
4
3
4
1
10 1 13
A CT = 4
5
11
8 17 5
)
13
Dr. Abdalsattar.K.Hashim
4 1
1 3
2 3 1
| A|= 2
=3(10)-4(-4) +1(8)
=30+16+8=54
Then
A1=
1 10 1 13
A CT
4
5
11
| A| = 54
8 17 5
Let us examine
)(
1 3 4 1 10 1 13
AA =
2 1 3 4
5
11
54
2 3 1 8 17 5
1
1 54 0 0
0 54 0
54
0 0 54
( )
1 0 0
0 1 0
0 0 1
6. Orthogonal Matrices
The ordinary three dimensional spaces may be
described by the Cartesian coordinates system (x,
y, z). Now, let us suppose that there is another
Cartesian frame of reference, centered at the same
origin but has the axes(x', y', z') oriented as shown
in figure (1).
14
Dr. Abdalsattar.K.Hashim
Fig. 1
The unit vector
^
i'
(9)
^j ' ^k '
(10)
(11)
'
'
'
The cosines, cos ( x , x ) , cos ( x , y )cos ( x , z)
nth
mth
primed
mn
and we
amn
, so we
'
^ 11 + ^j a12 + k^ a13
i^ =ia
(12a)
(12b)
(12c)
(13a)
which is
(14)
(15)
(16)
(17)
'
'
i^ , ^j k^ '
respectively we
obtain
'
(18a)
(18b)
16
Dr. Abdalsattar.K.Hashim
'
z =x a31 + y a32 + z a 33
(18c)
( )(
)( )
a11 a 12 a13 x
x'
y ' = a21 a 22 a23 y
z'
a31 a 32 a33 z
(19)
respectively we get
(20a)
()(
)( )
Substituting for
()(
(21)
()
x'
y'
z'
)(
)( )
(22)
)(
(23)
Then
17
Dr. Abdalsattar.K.Hashim
(24)
A A=1
A =A
Or
(25)
Matrices satisfying
orthogonal matrices.
equation
(24)
are
called
Example (10).
Determine which of the following an orthogonal
matrix is and which is not.
1
0
2
3
0
2
0
1
2
A= 1
2
0
a)
1
4
1
1
2
1
0
2
( )
1
5
b) B= 0
1
Solution:
a) As a start we write the transpose matrix
2
AT = 1
2
0
AT
1
0
2
3
0
2
0
1
Then
18
Dr. Abdalsattar.K.Hashim
)(
1
0
2
3
0
2
0
1
2
T
A A= 1
2
0
3
2
1
2
0
1
0
2
3
0
2
0
1
( )
1 0 0
A T A= 0 1 0
0 0 1
T
Since A satisfies the orthogonality condition A A=1
( )
1
5
B= 0
1
We write
( )
1
0
1
5
B T = 1 1 0
1
1 1
4
2
2
Then we calculate
( )(
1
0
1
5
T
B B= 1 1 0
1
1 1
4
2
2
1
5
0
1
1
4
1
1
2
1
0
2
1
)
19
Dr. Abdalsattar.K.Hashim
26
25
B T B= 1
5
11
20
( )
1
5
2
1
4
7
4
1
4
9
16
(26)
Where A is n n matrix,
is a numerical constant
x1
a11 a12 a1 n x 1
x2
a 21 a22 a2 n x 2
a n1 an 2 ann x n
xn
)( ) ( )
20
Dr. Abdalsattar.K.Hashim
a
22
( ) x 2+ a2 n x n =0
(27)
a21 x1 +
an 1 x1 +a n 2 x 2+ .. ( ann ) x n=0
a1 n
a
a21 (a22)
2n
an 1 an 2
| (ann) |=0
(28)
. The
Eigenvalues of matrix A.
Related to each eigenvalue, there is a column vector
x0
(29)
21
Dr. Abdalsattar.K.Hashim
( )
1 1 2
A= 0 2 1
0 0 3
Find
a) The eigenvalue
b) The eigenvectors
c) The unit eigenvectors (Normalized eigenvectors)
Solutions:
a) the characteristic equation is
1
1
2
0
2
1 =0
0
0
3
( 1 ) [ ( 2 ) ( 3 )0 ]=0
( 1 )( 2 ) ( 3 )=0
=1,2, 3
=1
we write
22
Dr. Abdalsattar.K.Hashim
( )( ) ( )
x1
1 1 2 x1
0 2 1 x2 =(1) x2
0 0 3 x3
x3
(1)
2 x 2 + x 3=x 2
(2)
3 x3 =x3
(3)
(4)
(5)
(6)
We cannot determine
x1
x1
()
1
0
0
=2
we write
23
Dr. Abdalsattar.K.Hashim
( )( ) ( )
x1
1 1 2 x1
0 2 1 x2 =(2) x2
0 0 3 x3
x3
(7)
(8)
3 x3 =2 x 3
(9)
So
x 3=0
x 2=x 1
and
we choose
x 2=x 1=1
=2
is
()
1
1
0
=3
we write
( )( ) ( )
x1
1 1 2 x1
0 2 1 x2 =(3) x 2
0 0 3 x3
x3
(10)
(11)
(12)
24
Dr. Abdalsattar.K.Hashim
x3
()
3
2
2
1
2
1 1
2
1
3
0
0 ,
2
17 2
0
(( ) ) ( )
8.
Reduction
of
(Diagonalization)
Matrix
to
Diagonal
1 , 2 , 3
(3 3)
Form
and has
corresponding eigenvectors
( )( )( )
c 11 c12 c 13
c 21 , c22 , c 23
c 31 c32 c 33
( )
c 11 c 12 c 13
C= c21 c 22 c 23
c31 c 32 c 33
(30)
)( )
1 c11 2 c12 3 c 13
1 c21 2 c 22 3 c 23
1 c31 2 c32 3 c 33
(31)
Since
( )( )
c 11
1 c 11
A c21 = 1 c 21
c31
1 c 31
( )(
c 11 c 12 c13 1
AC = c 21 c 22 c23 0
c 31 c 32 c33 0
0 0
2 0
0 3
(32)
i.e.
1 0 0
AC =C 0 2 0
0 0 3
(33)
26
Dr. Abdalsattar.K.Hashim
1
C AC =C C 0
0
1
0 0
2 0
0 3
(35)
(34)
And finally
1
1
C AC= 0
0
0 0
2 0
0 3
3 3
3 3
n n
27
Dr. Abdalsattar.K.Hashim
( )
1 1 2
0 2 1
0 0 3
Example 13.
Diagonalize the matrix of example 11, using the invertible
1
matrix C such that C AC is diagonal.
( )( ) ( )
1 1
3
,
0 1
2
0 0
2
then
( )
1 1 3
C= 0 1 2
0 0 2
C1=
1 2 2 1
0 2 2
2
0 0
1
we find that,
C1=
C CT
|C|
So
C1 AC =
)( )( )
1 2 2 1 1 1 2 1 1 3
0 2 2 0 2 1 0 1 2
2
0 0
1 0 0 3 0 0 2
)( )
1 0 0
1 2 0 0
C AC = 0 4 0 = 0 2 0
2
0 0 6
0 0 3
1
28
Dr. Abdalsattar.K.Hashim
A= ( A ) = AT
A T
(36)
Is usually denoted by
+
A , and it is called the adjoint
(37)
(38)
(39)
29
Dr. Abdalsattar.K.Hashim
(40)
an eigenvalue
(41)
+ A
Xi
(42)
(43)
(44)
30
Dr. Abdalsattar.K.Hashim
+
Xi
(45)
i
i X
(46)
(47)
i = i
(48)
Or that i is real.
But this result is true for any value of
then all
31
Dr. Abdalsattar.K.Hashim
Let
Xi
and
distinct
Xj
eigenvalues
i , j
respectively
and
let
the
(49)
AX j= j X j
(50)
+
Xj
+
Xi
(51)
X
+
+ AX j=X X j= j
Xi
(52)
(53)
+ X i=0
(54)
32
Dr. Abdalsattar.K.Hashim
(55)
at (0, 1, 1)
m2=1
at (1, 1, 0)
m3=1
at (1, 0, 1)
eigenvalues
and
set
of
orthogonal
Solutions:
a) the inertia matrix has the diagonal components
3
I xx = mi (r 2i xi2)
i
I xx=4
3
I yy = mi (r 2i y 2i )
i
33
Dr. Abdalsattar.K.Hashim
I zz = mi (r i zi )
2
I xy = mi xi y i
i
[ 1 ( 0 ) ( 1 ) +1 ( 1 ) ( 1 ) +1 ( 1 ) ( 0 ) ]
I xy =1
I xy =I yx =1
3
I xz = mi x i z i
i
[ 1 ( 0 ) ( 1 ) +1 ( 1 ) ( 0 ) +1 ( 1 )( 1 ) ]
I xz =1
I xz =I zx =1
34
Dr. Abdalsattar.K.Hashim
I yz= mi y i z i
i
[ 1 ( 1 ) (1 )+1 ( 1 ) ( 0 ) +1 ( 0 )( 1 ) ]
I yz=1
I yz=I zy=1
I xx I xy
I = I yx I yy
I zx I zy
I xz
I yz
I zz
Then
4 1 1
I = 1 4 1
1 1 4
4 1
1
1 4 1 =0
1
1 4
( 4 ) [ ( 4 ) ( 4 )1 ] + [ (1 ) ( 4 )1 ] [ 1+ ( 4 ) ] =0
=2
is
)( ) ( )
4 1 1 x
x
=2
1 4 1 y
y
1 1 4 z
z
35
Dr. Abdalsattar.K.Hashim
)( )
2 1 1 x
1 2 1 y =0
1 1 2 z
x +2 yz=0
x y+ 2 z=0
()
1
1
1
()
The eigenvalue equation associated with
=5
)( ) ( )
4 1 1 x
x
=5
1 4 1 y
y
1 1 4 z
z
36
Dr. Abdalsattar.K.Hashim
)( )
1 1 1 x
1 1 1 y =0
1 1 1 z
()
0
1
1
()
To find the third eigenvector which is normal to the first
and the second eigenvectors we denoted the first
eigenvector by r 1 and the second by r 2 then
r 3=r 1 r 2=(
1
1
1
1
1
i+
j+ k )(0 i+
j
k)
3 3 3
2 2
2
1
1
i+
j+
k
6 6 6
37
Dr. Abdalsattar.K.Hashim
()
2
6
1
6
1
6
( )( ) ( )
Example 15
Given the matrix
1 0 6
A= 0 2 0
6 0 6
1
0
6
0 (2+ )
0 =0
6
0
6
( 1 ) [( 2+ ) ( 6 ) ] +36 ( 2+ ) =0
38
Dr. Abdalsattar.K.Hashim
=2,3,10
=2
can be
1 0 6 x
x
0 2 0 y =2 y
6 0 6 z
z
)( ) ( )
1+2
0
6
x
0 2+2
0
y =0
6
0
6+2 z
)( )
3 x+6 z=0
6 x+ 8 z =0
Then x=0
And z=0
So we choose y=1
The eigenvector related to
=2
is
()
0
1
0
the
=3
can be obtained
equation
)( )
1+3
0
6
x
0 2+3
0 y =0
6
0
6+3 z
4 x +6 z=0
y=0
39
Dr. Abdalsattar.K.Hashim
6 x+ 9 z=0
So we get
2 x =3 z
If we choose
Then
z=2
x=3
=3
is
()
3
0
2
=10
, we write
)( )
110
0
6
x
0
210
0
y =0
6
0
610 z
9 x +6 z=0
12 y=0
6 x4 z=0
3 x=2 z
()
2
0
3
40
Dr. Abdalsattar.K.Hashim
()
3
0 1
0
2
2
1
,
1
0
13 13
0
3
()
()
()
3
( 0 1 0 ) 0 =0
2
And
()
2
( 0 1 0 ) 0 =0
3
Finally
()
2
(3 0 2 ) 0 =6+ 0+6=0
3
2 0
0
0 3 0
0
0 10
41
Dr. Abdalsattar.K.Hashim