Académique Documents
Professionnel Documents
Culture Documents
What we will do during the next 3 weeks What we will do during the next 3 weeks
Review of matrices
S t f li l b i ti AX B Systems of linear algebraic equations AX=B
Finding solution(s) by row operations
Inverse of a square matrix A q
Finding inverse by row operations
Determinant of a square matrix A
C l l i d i b i Calculating determinant by row operations
Bigger pictures: how are these 3 topics connected together? Bigger pictures: how are these 3 topics connected together?
M t i i bl
In between, we will look at vector space and linearly independent
vectors
Matrix eigenproblem
Diagonalisation problem
Review on matrices
What is a matrix? What is a matrix?
An MN matrix is an array of MN numbers enclosed within a
pair of brackets and arranged in M rows and N columns.
1
2 1 3 6 9
1
(3) 2
t
| |
|
| | | |
|
Examples:
1
(3) 2
1 2 2 3 9 2
5 6
| | | |
|
| |
|
\ . \ .
|
\ .
The numbers making up a matrix are referred to as elements
of the matrix.
In a square matrix the number of rows equals the number of In a square matrix, the number of rows equals the number of
columns.
We use bold capital letters such as A, B, P and Q to denote
matrices E g we can write:
| |
matrices. E.g. we can write:
1 2 3
4 5 6
| |
=
|
\ .
A
Notation otat o
Let A be an MN matrix.
D t th l t i th i th d j th Denote the element in the i-th row and j-th
column of A by a
ij
. Then we can write:
| |
( ) a = A
11 12 1
21 22 2
N
N
a a a
a a a
| |
|
|
=
( )
ij
a = A
1 2 M M MN
a a a
|
=
|
|
\ .
1 2 M M MN \ .
Let A = (a ) and B = (b ) be both MN (same order)
Equality of matrices
Let A = (a
ij
) and B = (b
ij
) be both MN (same order).
A and B are said to be equal that is A = B if a = b A and B are said to be equal, that is, A = B, if a
ij
= b
ij
.
E.g.
3 a b c c
c a b d b
+
| | | |
=
| |
\ . \ .
c a b d b
\ . \ .
, 3, , a b c c c d a b b + = = = =
Addition of matrices Addition of matrices
If A+B = C then C=(c
ij
) is MN and c
ij
= a
ij
+ b
ij
.
1 2 3 7 8 9 1 7 2 8 3 9
4 5 6 10 11 12 4 10 5 11 6 12
+ + +
| | | | | |
+ =
| | |
\ . \ . \ .
E.g.
4 5 6 10 11 12 4 10 5 11 6 12
| | |
+ + +
\ . \ . \ .
Multiplication of a number to a matrix
If A = (a
ij
) and c is a number then cA = (ca
ij
) and
cA has the same order as A.
E.g.
1 2 2 4
2
3 4 6 8
| | | |
=
| |
\ . \ .
We write (1)A as A. So BA = B + (A).
E.g.
2 3 1 2 2 1 3 2
4 4 3 2 4 3 4 2
| | | | | |
=
| | |
\ . \ . \ . \ . \ . \ .
The transpose of a matrix A is denoted by A
T
. p y
1 2 3 1 4 7
4 5 6 2 5 8
| | | |
| |
T
A A 4 5 6 2 5 8
7 8 9 3 6 9
| |
= =
| |
| |
\ . \ .
T
A A
If A = A
T
then A is said to be symmetric. If A A then A is said to be symmetric.
1 3 5 1 3 5
| | | |
1 3 5 1 3 5
3 0 6 3 0 6
| | | |
| |
= =
| |
| |
T
A A
5 6 9 5 6 9
| |
\ . \ .
Product of matrices
Let A=(a
ij
) and B=(b
ij
) be MN and PQ matrices
respectively.
If N P f th d t t i AB If N=P, we can form the product matrix AB.
If AB is denoted by C= (c
ij
) then C is MQ and the y (
ij
)
element c
kp
is calculated using the k-th row of A and p-th
column of B as follows.
b
| |
kp
c =
( )
1
2
1 2
p
p
k k kN
b
b
a a a
| |
|
|
|
|
1 1 2 2 k p k p kN Np
a b a b a b = + + +
p
A typo here in the 238
page document (p56)
Np
b
|
|
|
\ .
1
N
kn n j
n
a b
=
=
1 n
What is the condition for forming the product BA?
What is the order of BA if it can be formed?
Example:
1 2
| |
2 4
1 2
5 1 2 2
3 4
3 3 1 2
5 6
| |
| |
|
= =
|
|
\ .
|
\ .
P Q
3 2
5 6
\ .
We can form PQ but not QP.
1 2 11 7 4 6
5 1 2 2
3 4 27 15 10 14
| | | |
| |
| |
= =
|
| |
PQ
2 4
3 2 3 4
3 4 27 15 10 14
3 3 1 2
5 6 43 23 16 22
= =
|
| |
\ .
| |
\ . \ .
PQ
Multiplication of matrices is not commutative that is even if AB and Multiplication of matrices is not commutative, that is, even if AB and
BA can be formed, AB may or may not be equal to BA.
Identity matrices de t ty at ces
An NN matrix (c
ij
) such that c
11
= c
22
= c
33
== c
NN
=1 and c
ij
= 0
for i not equal to j is called an identity matrix.
1 0 0 0
1 0 0
1 0 0 1 0 0
| |
| |
|
| |
|
|
Examples:
1 0 0 1 0 0
0 1 0
0 1 0 0 1 0
0 0 1
0 0 0 1
| |
|
|
|
|
|
\ .
|
|
\ .
\ . \ .
Whats special about identity matrices?
Let I be an identity matrix and A be any matrix Let I be an identity matrix and A be any matrix.
If the product IA can be formed then IA = A.
Similarly if the product AI can be formed then AI = A Similarly, if the product AI can be formed then AI = A.
Lets start on linear algebra now
A good starting point is to look at a
system of linear algebraic equations.
Whats a linear algebraic equation?
Many simultaneous linear algebraic equations
form a system.
How can we solve a system of linear
algebraic equations?
Whats a linear algebraic equation?
An example of a linear algebraic equation in
one unknown x is:
2 1 0 x + =
The solution of the above linear algebraic
equation is:
1
A linear algebraic equation in two unknowns x and y
1
2
x =
A linear algebraic equation in two unknowns x and y
is an equation of the form:
3 9 x y = 3 9 x y =
If we let y =0 then x = 3. So (x,y)=(3,0) is a solution of the above equation.
Whats a linear algebraic equation?
A li l b i ti i N k A linear algebraic equation in N unknowns x
1
, x
2
,
, x
N
and x
N
is an equation of the form:
1 1 2 2
...
N N N
c x c x c x d + + + =
Why bother? y
Many problems in engineering and
h i l i f l t d i physical sciences are formulated in
terms of a system of linear algebraic
ti equations.
This temperature p
profile in the human
eye was obtained from
the boundary element the boundary element
method by solving a
system of 470 linear
algebraic equations in
470 unknowns.
Heres a system of N linear algebraic
equations in N unknowns.
a x a x a x a x b + + + + =
11 1 12 2 13 3 1 1
21 1 22 2 23 3 2 2
...
...
N N
N N
a x a x a x a x b
a x a x a x a x b
+ + + + =
+ + + + =
b + + + +
1 1 2 2 3 3
...
N N N NN N N
a x a x a x a x b + + + + =
a
ij
a is the (constant) coefficient of the unknown x
j
in the i-th equation.
b
is the constant term in the i-th equation
i
b
is the constant term in the i-th equation.
The system can be written in matrix y
form AX =B, where:
11 12 1
...
N
a a a
| |
|
Example:
12 22 2
1 2
...
N
N N NN
a a a
a a a
|
|
=
|
|
\ .
A
2 3 10
0
x y
x y
+ =
+ =
1 2 N N NN
a a a
\ .
1
2
x
x
| |
|
|
X
0 x y +
2 3 10 x
| | | | | |
=
| | |
N
x
|
=
|
|
\ .
X
1 1 0 y
| | |
\ . \ . \ .
1
2
b
b
| |
|
|
=
|
B
2 3 10
0
x y
x y
+
| | | |
=
| |
+
\ . \ .
N
b
|
|
\ .
0 x y +
\ . \ .
Solutions of a linear algebraic equation g q
Consider a single linear algebraic equation
c x c x c x d + + + =
1 1 2 2
...
N N N
c x c x c x d + + + =
1 1
x
x
o
o
| | | |
| |
| |
is said to be a solution of the above linear
l b i ti if th LHS f th ti
2 2
N N
x
x
o
o
| |
=
| |
| |
\ . \ .
algebraic equation if the LHS of the equation
equals its RHS when we replace x
1
, x
2
, , x
N
by o
1
, o
2
, , o
N
respectively.
N N \ . \ .
Example:
We can find many other solutions easily.
2 0 x y z + =
1
2
x
| | | |
| |
is a sol tion b t is not
2
1
x
y
| | | |
| |
=
| |
2
3
y
z
| |
=
| |
| |
\ . \ .
is a solution but is not.
1
3
y
z
=
| |
| |
\ . \ .
Solution of a system of linear
algebraic equations
1 1
x o
| | | |
| |
2 2
x o
| |
| |
=
| |
| |
If
is a solution of
N N
x o
| |
\ . \ .
each and every linear algebraic y g
equation in the system then it is
said to be a solution of the system said to be a solution of the system.
It is possible that a system of linear
algebraic equations has no solution.
Example:
1 0 1 0
5
x y
x y
+ =
+ =
Such a system is said to be inconsistent
y
Such a system is said to be inconsistent.
It is possible that a consistent system It is possible that a consistent system
has more than one solutions.
E l Example:
1 0 x y + =
2 2 2 0 x y + =
10 x y + =
The system really contains only one linear algebraic
equation in 2 unknowns!
So we can find infinitely many solutions for the system So we can find infinitely many solutions for the system.
If a consistent system of linear algebraic
equations has only one solution, we say q y , y
the system has a unique solution.
To summarise, a system of linear algebraic
equations can either be consistent or inconsistent.
If it is consistent, it can have either a unique
solution or infinitely many solutions.
Given a system of linear algebraic
equations AX = B, how do we know
whether it is consistent or not?
If it is consistent how do we find all If it is consistent, how do we find all
its solutions?
Reduce the system AX = B to a
simpler but equivalent system
UX = C.
AX = B and UX = C are equivalent if they have
tl th l ti ( ) exactly the same solution(s).
If we can work out the solution(s) of UX = C,
we would have solved AX B we would have solved AX = B.
If the square matrix U is an upper triangular
matrix the system UX C would be simpler matrix, the system UX = C would be simpler
enough for us to work out its solution(s) (if any).
Wh t i t i l t i ? What is an upper triangular matrix?
1 4 5 6
| |
|
E.g.
0 1 6 8
|
|
|
0 0 2 0
0 0 0 3
|
|
\ .
0 0 0 3
\ .
To solve AX = B, reduce it to an
i l t t UX C h equivalent system UX = C, where
U is an upper triangular matrix.
How can this be done?
Write AX = B in tableau form A | B.
2 3 4 6 x y z + + =
2 3 4 6
3 5 2 7
E.g. E.g.
3 5 2 7
10 5 9
x y z
x y z
+ =
+ + =
3 5 2 7
1 10 5 9
1 1 2 3 2
0
2 2 1
R R R
0 1 -2 3
2 1 4 0 1
0 1 1 1 8
0 1 1 1 8
0
3 3 1
2 R R R
-3 8 -6 -3
0 1 1 1 8
0 1 1 1 8
1 1 2 3 2
1 1 2 3 2
0 0 1 2 3
0 3 8 6 3
1 1 2 3 2
0 1 1 1 8
0 3 8 6 3
2 4
R R
0 3 8 6 3
0 1 1 1 8
0 3 8 6 3
0 0 1 2 3
1 1 2 3 2
1 1 2 3 2
0 1 1 1 8
1 1 2 3 2
0 1 1 1 8
0 0 11 3 21
0 0
0
0 0 1 2 3
0 3 3 2
3 R R R +
11 -3 21
0
-19 12
4 4 3
11 R R R
x y z w
1 1 2 3 2
0 1 1 1 8
8 y z w + + =
2 3 2 x y z w + + =
0 0 11 3 21
0 0 0 19 12
19 12 12 / 19
11 3 21 (21 3 )/11 33/19 z w z w = = + =
y
0 0 0 19 12
19 12 12 / 19 w w = =
The onl sol tion of the s stem is The only solution of the system is
9/19 x
| | | |
| |
131/19
33/19
y
z
| |
| |
=
| |
| |
12/19 w
| |
\ . \ .
Linear Algebra
What we will do during the next 3 4 weeks What we will do during the next 3-4 weeks
Review of matrices
S t f li l b i ti AX B
1
+ a
1N
x
N
= 0
a
21
x
1
+ a
22
x
2
+ + a
2(N
1)
x
N
1
+ a
2N
x
N
= 0
a
31
x
1
+ a
32
x
2
+ + a
3(N 1)
x
N 1
+ a
3N
x
N
= 0 a
31
x
1
+ a
32
x
2
+ + a
3(N
1)
x
N
1
+ a
3N
x
N
0
a
N1
x
1
+ a
N2
x
2
+ + a
(N
1)
x
N
1
+ a
NN
x
N
= 0
In matrix form, it can be written as AX = 0
0
| |
where 0 = .
0
0
| |
|
|
|
0
|
|
\ .
|
1 3
1 0
| | | |
| |
| |
If possible, express as a linear combination of
3
4
|
|
\ .
and .
0
1
| |
|
|
1 , 0
0 1
| |
| |
\ . \ .
3
|
|
\ .
If possible, find a, b and c such that
| |
|
5
| | | | | |
| | |
1 3 0
| |
|
+ 3b a
|
|
|
\ .
-3 =
-4
| | |
| | |
| | |
\ . \ . \ .
1 0 1
0 1 3
+ b + c a
|
|
|
\ .
+
+ 3
c
b c
= a
If possible, solve:
a + 3b +0c = 5
a + 0b + c = 3
0a + b +3c = 4
Write the equations in tableau form:
1 3 0 5
a b c
1 3 0 5
0
R R R
3 1 8
1 0 1 3
0 1 3 4
0 1 3
0
4
2 2 1
R R R
3 1 8
10c = 20 c = 2
1 3 0 5
10c = 20 c = 2
3b+(2) = 8 b = 2
0 3 1
0 0
8
3 3 2
3 R R R +
10 20
a+3(2) = 5 a = 1
3 3 2
Yes we can express as a linear combination of
5
3
| |
|
|
1 3
1 0
| | | |
| |
| |
Yes, we can express as a linear combination of
3
4
|
|
\ .
and !
0
1
| |
|
|
1 , 0
0 1
| |
| |
\ . \ .
3
|
|
\ .
5 1 3 0
| | | | | | | |
Specifically, we find that:
5 1 3 0
3 ( 1) 1 2 0 ( 2) 1
| | | | | | | |
| | | |
= + +
| | | |
| | | |
4 0 1 3
| | | |
| | | |
\ . \ . \ . \ .
More examples: Problems 5 and 6 on page 86
Let w w w and w be vectors each with
Linearly independent vectors
Let w
1
, w
2
, , w
P1
and w
P
be vectors, each with
N elements.
We say that w
1
, w
2
, , w
P 1
and w
P
are linearly We say that w
1
, w
2
, , w
P1
and w
P
are linearly
independent vectors if we cannot find any one
of these vectors to be a linear combination of
the other vectors.
How do we check if w
1
, w
2
, , w
P1
and w
P
are
li l i d d ? linearly independent?
Form the homogeneous system
c
1
w
1
+ c
2
w
2
+ + c
P1
w
P1
+ c
P
w
P
= 0
If c
1
= c
2
= = c
P1
= c
P
= 0 is the only solution
of the system then the vectors are linearly
independent.
Why does this work?
How do we check if w
1
, w
2
, , w
P1
and w
P
are
linearly independent? linearly independent?
Form the homogeneous system
c
1
w
1
+ c
2
w
2
+ + c w
P 1
+ c
P
w
P
= 0 c
1
w
1
+ c
2
w
2
+ + c
P1
w
P1
+ c
P
w
P
= 0
If c
1
= c
2
= = c
P1
= c
P
= 0 is the only solution
of the system then the vectors are linearly of the system then the vectors are linearly
independent. Why does this work?
For example if we can find c which is not zero then For example, if we can find c
1
which is not zero then
we can write:
3 2 P
c c c
= w w w w
1 2 3
1 1 1
P
c c c
... = w w w w
That is, we can express w
1
as a linear combination of w
2
, w
2
, ,
and hence the ectors are not linearl independent w
P1
and w
P
, hence the vectors are not linearly independent.
p77
Are
1 2 1
1 , 1 , 0
1 1 1
| | | | | |
| | |
| | |
| | |
\ . \ . \ .
linearly independent?
1 1 1
| | |
\ . \ . \ .
1 1 2 0
| | | | | | | |
| | | |
c
1
c
2
c
3
1 2 3
0 1 1 0
1 1 1 0
c c c
| | | | | | | |
| | | |
+ + =
| | | |
| | | |
\ . \ . \ . \ .
1 1 2 0
0 1 1 0
-1 -1 -1 0
Is c
1
= c
2
= c
3
= 0 the only
solution?
1 1 2 0 Yes! 1 1 2 0
0 1 1 0
0 0 1 0
Yes!
Vectors are linearly independent.
0 0 1 0
1 2 1
1 , 2 , 2
| | | | | |
| | |
| | |
| | |
What about ?
2 4 3
| | |
| | |
\ . \ . \ .
1 2 1 0
| | | | | | | |
1 2 1 0
1 2 3
1 2 1 0
1 2 2 0
2 4 3 0
c c c
| | | | | | | |
| | | |
+ + =
| | | |
| | | |
\ . \ . \ . \ .
1 2 1 0
1 2 2 0
2 4 3 0
\ . \ . \ . \ .
1 2 1 0
0 0 1 0
0 0 0 0
c
1
=c
2
=c
3
=0 is not the only solution.
A possible non-trivial solution is:
c = 2 c = 1 and c =0
0 0 0 0
c
1
= 2, c
2
= 1 and c
3
=0.
1 2 1 0 2 1
2 1 2 0 2 0 2 2 1
| | | | | | | | | | | |
| | | | | |
+ = =
| | | | | |
Vectors are not linearly
independent.
2 1 2 0 2 0 2 2 1
2 4 3 0 4 2
+ = =
| | | | | |
| | | | | |
\ . \ . \ . \ . \ . \ .
p