Lecture 01
Lecture 01
=
d
d
2 d
d
2
2
2
wL
and to get possible MAX and MIN and to get possible MAX and MIN
( ) 0 = = z L w
dz
dM
which occurs for z = L which occurs for z = L
L
21 21
Functions Functions
It appears clear that in this calculation we correctly determine It appears clear that in this calculation we correctly determined d
the MIN of the moment, but the first derivative didn the MIN of the moment, but the first derivative didn t give us t give us
the MAX. the MAX. WHY? WHY?
Simply because the our domain of interest is in the range: Simply because the our domain of interest is in the range:
z z [0, [0,L L] ]
For example, For example, x x [ [a a, ,b b) would mean that ) would mean that x x can vary from can vary from a a (and (and x x
can also equal can also equal a a) to ) to b b (but (but x x cannot be equal to cannot be equal to b b). ).
NOTE: NOTE:
[ [ or or ] ] means that the extreme value is still part of the domain means that the extreme value is still part of the domain
of interest, using either of interest, using either ( ( or or ) ) would mean that the extreme would mean that the extreme
value would not be included in the domain of interest. value would not be included in the domain of interest.
22 22
Functions Functions
M
z
0
0
Going back to the Bending Moment Diagram (BMD) and Going back to the Bending Moment Diagram (BMD) and
remembering that z remembering that z [0, [0,L L]: ]:
2
2
wL
MIN determined from MIN determined from
equating equating dM/dx dM/dx = 0 = 0
The MAX or MIN of the function M (which represents the The MAX or MIN of the function M (which represents the
moment) can be obtained by differentiating M with respect moment) can be obtained by differentiating M with respect
to x, but we need also to make sure that MAX or MIN do not to x, but we need also to make sure that MAX or MIN do not
occur at the extremes of our domain, as the derivative does occur at the extremes of our domain, as the derivative does
not know where our domain of interest starts or finishes. not know where our domain of interest starts or finishes.
( )
2
2
z L
w M
=
Area of interest [0,L] Area of interest [0,L]
L
MAX of the area of MAX of the area of
interest BUT not of interest BUT not of
the actual parabola the actual parabola
23 23
Derivatives Derivatives
?
d
) ( d
=
x
x f
24 21
2
4 ) (
4
7 6
+ + = x
x
x x x f
Would you be able to derive Would you be able to derive f f( (x x) with respect to ) with respect to x x? ?
And with respect to And with respect to z z? ?
EXAMPLE 7: EXAMPLE 7:
24 24
Derivatives Derivatives
21 2 28 6
d
) ( d
3 6 5
+ + = x x x
x
x f
Recalling that the derivation of a Recalling that the derivation of a
polynomial is calculated as polynomial is calculated as
( )
5
6
6
d
d
x
x
x
=
1
d
d
=
n
n
nx
x
x
So, differentiating each of our polynomials yields: So, differentiating each of our polynomials yields:
24 21
2
4 ) (
4
7 6
+ + = x
x
x x x f
( )
6
7
28
d
4 d
x
x
x
=
( )
3
4
2
d
2
d
x
x
x
=
( )
21
d
21 d
=
x
x
( )
0
d
24 d
=
x
Differentiating with respect to Differentiating with respect to z z it would be equal to zero. it would be equal to zero.
5
25 25
Derivatives: Summary Derivatives: Summary
SUMMARY OF DERIVATIVES SUMMARY OF DERIVATIVES
( )
( )
1
d
d
= =
n
nax x f
x
x f
( )
n
ax x f =
( )
( )
bx
abe x f
x
x f
= =
d
d
( )
bx
ae x f =
( )
( ) ( ) bx ab x f
x
x f
sin
d
d
= =
( ) ( ) bx a x f cos =
Function Function Its derivative Its derivative
( )
( ) ( ) bx ab x f
x
x f
cos
d
d
= = ( ) ( ) bx a x f sin =
26 26
Referring to functions Referring to functions
5 2
3 55 2 ) , , ( z xy x z y x f + =
Let Let s say that we have two functions defined as follows: s say that we have two functions defined as follows:
Let Let s revise how we can refer to a function s revise how we can refer to a function
2 66 3 ) , , (
3 7
+ = x x z y x g
In these cases we can refer to these as either In these cases we can refer to these as either f f and and g g, or , or
f f( (x x, ,y y, ,z z) and ) and g g( (x x, ,y y, ,z z), or even as ), or even as f f( (x x, ,y y, ,z z) and ) and g g( (x x) (as only the ) (as only the
variable variable x x is contained in is contained in g g). ).
For example, adopting the latter notation, we can write: For example, adopting the latter notation, we can write:
5 2
3 55 2 ) , , ( z xy x z y x f + =
2 66 3 ) (
3 7
+ = x x x g
27 27
Derivatives Derivatives
?
) , , (
1
=
x
z y x g
( ) x z y x g 2 cos ) , , (
1
=
Would you be able to derive Would you be able to derive g g
1 1
( (x x, ,y y, ,z z) with respect to ) with respect to x x, , y y and and z z? ?
EXAMPLE 8: EXAMPLE 8:
|
.
|
\
|
=
L
z
z y x g
sin ) , , (
2
?
) , , (
1
=
y
z y x g
?
) , , (
1
=
z
z y x g
?
) , , (
2
=
x
z y x g
And what about And what about g g
2 2
( (x x, ,y y, ,z z)? Would you be able to derive it with )? Would you be able to derive it with
respect to respect to x x, , y y and and z z? ?
?
) , , (
2
=
y
z y x g
?
) , , (
2
=
z
z y x g
28 28
Derivatives Derivatives
( ) x
x
z y x g
2 sin 2
) , , (
1
=
( ) x z y x g 2 cos ) , , (
1
=
Would you be able to derive Would you be able to derive g g
1 1
( (x,y,z x,y,z) with respect to ) with respect to x x, , y y and and z z? ?
|
.
|
\
|
=
L
z
z y x g
sin ) , , (
2
0
) , , (
1
=
y
z y x g
0
) , , (
1
=
z
z y x g
0
) , , (
2
=
x
z y x g
And what about And what about g g
2 2
( (x,y,z x,y,z)? Would you be able to derive it with )? Would you be able to derive it with
respect to respect to x x, , y y and and z z? ?
0
) , , (
2
=
y
z y x g
|
.
|
\
|
=
L
z
L z
z y x g
cos
) , , (
2
29 29
Integrals: Summary Integrals: Summary
SUMMARY OF INTEGRALS SUMMARY OF INTEGRALS
( ) ( ) C
n
ax
x x f x F
n
+
+
= =
+
}
1
d
1
( )
n
ax x f =
( )
bx
ae x f =
( ) ( ) bx a x f cos =
Function Function Its integral Its integral
( ) ( ) bx a x f sin =
( ) ( ) C
b
ae
x x f x F
bx
+ = =
}
d
( ) ( )
( )
C
b
bx a
x x f x F + = =
}
sin
d
( ) ( )
( )
C
b
bx a
x x f x F + = =
}
cos
d
NOTE: NOTE: the constant the constant C C depends upon the limits of the integral depends upon the limits of the integral
30 30
Integrals: Check Integrals: Check
How we can check ourself when calculating integrals? How we can check ourself when calculating integrals?
and checking that and checking that
F F (x (x) = ) = f(x f(x) )
( )
( ) ( ) x f x F
x
x F
= =
d
d
To check your To check your calcs calcs always make sure that always make sure that
For example, based on the previous table: For example, based on the previous table:
( ) ( ) C
n
ax
x x f x F
n
+
+
= =
+
}
1
d
1
( )
n
ax x f =
( )
n
n
ax
x
C
n
ax
x
x F
=
|
|
.
|
\
|
+
+
=
+
d
1
d
d
d
1
OK OK
6
31 31
Integrals Integrals
( ) C x x f x F + =
}
d ) (
Would you be able to carry out the following integrals? Would you be able to carry out the following integrals?
EXAMPLE 9: EXAMPLE 9:
24 21
2
) (
2
+ = x
x
x f
( ) x x f x F d ) (
10
1
}
=
( ) C z x f z x F + =
}
d ) ( ,
32 32
Integrals Integrals
( ) C x
x x
C x x
x
x F + + = +
|
|
.
|
\
|
+ =
}
24
2
21
6
d 24 21
2
2 3 2
The integrals can be carried out as follows: The integrals can be carried out as follows:
( ) =
(
+ =
|
|
.
|
\
|
+ =
=
=
}
10
1
2 3 10
1
2
24
2
21
6
d 24 21
2
x
x
x
x x
x x
x
x F
( )
( )
( )
( ) 657 1 24
2
1 21
6
1
10 24
2
10 21
6
10
2 3 2 3
=
(
+
(
+ =
( ) C z x
x
C z x
x
z x F +
|
|
.
|
\
|
+ = +
|
|
.
|
\
|
+ =
}
24 21
2
d 24 21
2
,
2 2
33 33
Matrix algebra Matrix algebra
What is a MATRIX? What is a MATRIX?
Let Let s now move on to revise some basic concepts of Matrix s now move on to revise some basic concepts of Matrix
Algebra which we Algebra which we ll need to use very soon when we will ll need to use very soon when we will
be dealing with the Stiffness Method. be dealing with the Stiffness Method.
A matrix is a rectangular arrangement of numbers. A matrix is a rectangular arrangement of numbers.
(
(
(
(
=
mn m m
n
n
A A A
A A A
A A A
2 1
2 22 21
1 12 11
A
Matrix Matrix A A has has m m rows and rows and n n columns. columns.
So, we can say that So, we can say that A A is a is a m mx xn n matrix, matrix,
or has an order of or has an order of m mx xn n. .
NOTE: NOTE: m mx xn n is read is read m m by by n n . .
A A
ij ij
= element of the matrix located at row = element of the matrix located at row i i and column and column j j
34 34
Matrix algebra Matrix algebra
What is a ROW MATRIX or ROW VECTOR? What is a ROW MATRIX or ROW VECTOR?
A row matrix or row vector is a matrix with a single row. A row matrix or row vector is a matrix with a single row.
NOTE: it can be considered equal to a vector whose elements are NOTE: it can be considered equal to a vector whose elements are
written horizontally written horizontally
[ ]
n
a a a
2 1
= a NOTE: A row matrix is a matrix 1x NOTE: A row matrix is a matrix 1xn n. .
NOTE: NOTE: Matrices and vectors will be referred to in the notes with bold Matrices and vectors will be referred to in the notes with bolded ed
letters. Usually, in the following lecture notes, capital letter letters. Usually, in the following lecture notes, capital letters will be used s will be used
for matrices and small letters for vectors. for matrices and small letters for vectors.
What is a COLUMN MATRIX or COLUMN VECTOR? What is a COLUMN MATRIX or COLUMN VECTOR?
A column matrix or column vector is a matrix with a A column matrix or column vector is a matrix with a
single column. single column.
NOTE: it can be considered equal to a vector whose elements NOTE: it can be considered equal to a vector whose elements
are written vertically are written vertically
(
(
(
(
=
m
a
a
a
2
1
a
NOTE: A column matrix is a matrix NOTE: A column matrix is a matrix n nx1. x1.
35 35
Matrix algebra Matrix algebra
SQUARE MATRIX SQUARE MATRIX
There are some particular matrices which are worth mentioning. There are some particular matrices which are worth mentioning.
(
(
(
(
=
nn
A
A
A
0 0
0 0
0 0
22
11
A
Matrix which has same number of columns and Matrix which has same number of columns and
rows, i.e. rows, i.e. m mx xm m. .
DIAGONAL MATRIX DIAGONAL MATRIX
Square matrix with all elements in the matrix Square matrix with all elements in the matrix
equal to 0, except those located on the equal to 0, except those located on the
principal diagonal. principal diagonal.
(
(
(
(
=
1 0 0
0 1 0
0 0 1
I
UNIT OR IDENTITY MATRIX UNIT OR IDENTITY MATRIX
Diagonal matrix with all elements of the Diagonal matrix with all elements of the
diagonal equal to 1. Usually it is referred to diagonal equal to 1. Usually it is referred to
as as I I. .
36 36
Matrix algebra Matrix algebra
(
(
(
(
=
3 7 9 5
7 3 4 0
9 4 2 2
5 0 2 1
A
SYMMETRIC MATRIX SYMMETRIC MATRIX
Square matrix with the elements satisfying the condition Square matrix with the elements satisfying the condition A A
ij ij
= = A A
ji ji
; ;
for example: for example:
For example For example A A
12 12
= = A A
21 21
= 2, or = 2, or A A
32 32
= = A A
23 23
= 4. = 4.
7
37 37
Matrix algebra Matrix algebra
(
(
(
=
9 8 7
6 5 4
3 2 1
A
EQUALITY OF MATRICES EQUALITY OF MATRICES
Two matrices Two matrices A A and and B B are said to be EQUAL only if are said to be EQUAL only if A A
ij ij
= = B B
ij ij
for for
each values of each values of i i and and j j, for example: , for example:
as it can be observed that as it can be observed that A A
ij ij
= = B B
ij ij
for each value of for each value of i i and and j j
(
(
(
=
9 8 7
6 5 4
3 2 1
B
B A =
38 38
Matrix algebra Matrix algebra
(
(
(
=
2 6 4
7 7 7
5 2 3
A
ADDITION AND SUBTRACTION OF MATRICES ADDITION AND SUBTRACTION OF MATRICES
Matrices of same order (i.e. with same number of rows and Matrices of same order (i.e. with same number of rows and
columns) can be either added or subtracted by simply adding or columns) can be either added or subtracted by simply adding or
subtracting the corresponding elements, for example: subtracting the corresponding elements, for example:
(
(
(
=
9 8 7
6 5 4
3 2 1
B
(
(
(
=
(
(
(
+ + +
+ + +
+ + +
=
(
(
(
+
(
(
(
= +
11 14 11
13 12 11
8 4 4
9 2 8 6 7 4
6 7 5 7 4 7
3 5 2 2 1 3
9 8 7
6 5 4
3 2 1
2 6 4
7 7 7
5 2 3
B A
(
(
(
=
(
(
(
=
(
(
(
(
(
(
=
7 2 3
1 2 3
2 0 2
9 2 8 6 7 4
6 7 5 7 4 7
3 5 2 2 1 3
9 8 7
6 5 4
3 2 1
2 6 4
7 7 7
5 2 3
B A
39 39
Matrix algebra Matrix algebra
(
(
(
=
2 6 4
7 7 7
5 2 3
A
MULTIPLICATION OF A MATRIX BY A SCALAR MULTIPLICATION OF A MATRIX BY A SCALAR
When a matrix is multiplied by a scalar, then the result is When a matrix is multiplied by a scalar, then the result is
obtained by multiplying each element of the matrix by the obtained by multiplying each element of the matrix by the
scalar, for example: scalar, for example:
(
(
(
=
(
(
(
=
c c c
c c c
c c c
c c
2 6 4
7 7 7
5 2 3
2 6 4
7 7 7
5 2 3
A
where where c c is assumed to be a scalar. is assumed to be a scalar.
40 40
Matrix algebra Matrix algebra
=
=
n
k
kj ik ij
B A C
1
MATRIX MULTIPLICATION MATRIX MULTIPLICATION
The multiplication between two matrices The multiplication between two matrices A A and and B B (when possible) (when possible)
yields a third matrix yields a third matrix C C whose elements are calculated as: whose elements are calculated as:
where the orders of where the orders of A A, , B B and and C C are: are:
A A x x B B = = C C
m mx xn n n nx xq q m mx xq q
NOTE: two matrices can be multiplied by each other only if the NOTE: two matrices can be multiplied by each other only if the
number of columns of the first is equal to the number of rows of number of columns of the first is equal to the number of rows of
the second; in our examples, this is satisfied as: the second; in our examples, this is satisfied as:
n n = number of columns of the first matrix (i.e. = number of columns of the first matrix (i.e. A A) )
n n = number of rows of the second matrix (i.e. = number of rows of the second matrix (i.e. B B) )
41 41
Matrix algebra Matrix algebra
For example, the multiplication of For example, the multiplication of A A times times B B would yield: would yield:
and and A A
B B
C C
( (m mx xn n) )
( (n nx xq q) )
( (m mx xq q) )
(
(
(
=
32 31
22 21
12 11
A A
A A
A A
A
(
=
22 21
12 11
B B
B B
B
(
(
(
+ +
+ +
+ +
=
(
(
(
(
= =
22 32 12 31 21 32 11 31
22 22 12 21 21 22 11 21
22 12 12 11 21 12 11 11
22 21
12 11
32 31
22 21
12 11
B A B A B A B A
B A B A B A B A
B A B A B A B A
B B
B B
A A
A A
A A
AB C
=
=
n
k
kj ik ij
B A C
1
C C = = A A B B where where
and assuming and assuming A A and and B B to be to be
then then C C would be calculated as would be calculated as
42 42
Matrix algebra Matrix algebra
So, let So, let s look at a few examples of matrix multiplications: s look at a few examples of matrix multiplications:
Considering matrices Considering matrices A A, , B B, , C C and and D D, which one of the following , which one of the following
multiplications you think are possible? multiplications you think are possible?
(
(
(
=
33 32 31
23 22 21
13 12 11
C C C
C C C
C C C
C
(
(
(
(
=
42 41
32 31
22 21
12 11
D D
D D
D D
D D
D
(
(
(
=
32 31
22 21
12 11
A A
A A
A A
A
(
=
22 21
12 11
B B
B B
B
1) 1) B A B A
2) 2) A A B B
3) 3) B C B C
4) 4) C A C A
5) 5) A D A D
6) 6) A C A C
7) 7) D B D B
1) 1) no no
2) 2) yes yes
3) 3) no no
4) 4) yes yes
5) 5) no no
6) 6) no no
7) 7) yes yes
8
43 43
Matrix algebra Matrix algebra
SOME PROPERTIES OF MATRIX MULTIPLICATION SOME PROPERTIES OF MATRIX MULTIPLICATION
The PRODUCT of two matrices is in general NOT COMMUTATIVE The PRODUCT of two matrices is in general NOT COMMUTATIVE
A B A B B A B A
The DISTRIBUTIVE LAW is VALID The DISTRIBUTIVE LAW is VALID
A A ( ( B B + + C C ) = ) = A B A B + + A C A C
The ASSOCIATIVE LAW is VALID The ASSOCIATIVE LAW is VALID
A A ( ( B C B C ) = ( ) = ( A B A B ) ) C C
44 44
Matrix algebra Matrix algebra
TRANSPOSED MATRIX TRANSPOSED MATRIX
A matrix may be transposed by interchanging its rows and columns A matrix may be transposed by interchanging its rows and columns
A superscript A superscript T T is used to highlight is used to highlight
when a matrix is transposed when a matrix is transposed
(
(
(
=
32 31
22 21
12 11
A A
A A
A A
A
(
=
32 22 12
31 21 11
A A A
A A A
T
A
SOME PROPERTIES OF TRANSPOSED MATRICES: SOME PROPERTIES OF TRANSPOSED MATRICES:
( ( A A + + B B ) )
T T
= = A A
T T
+ + B B
T T
( k ( k A A ) )
T T
= k = k A A
T T
( ( A B A B ) )
T T
= = B B
T T
A A
T T
where k is a constant where k is a constant
45 45
Matrix algebra Matrix algebra
MATRIX PARTITIONING MATRIX PARTITIONING
A matrix may be subdivided into sub A matrix may be subdivided into sub- -matrices by partitioning it. matrices by partitioning it.
For example, For example,
(
=
(
(
(
=
22 21
12 11
34 33 32 31
24 23 22 21
14 13 12 11
A A
A A
A
A A A A
A A A A
A A A A
where where
[ ]
11 11
A = A [ ]
14 13 12 12
A A A = A
(
=
31
21
21
A
A
A
(
=
34 33 32
24 23 22
22
A A A
A A A
A
Matrix Matrix A A has been has been
partitioned partitioned
46 46
Matrix algebra Matrix algebra
WHY DO WE NEED MATRIX PARTITIONING? WHY DO WE NEED MATRIX PARTITIONING?
It can simplify our calculations at times, and it will be very u It can simplify our calculations at times, and it will be very useful seful
when we will look at the Stiffness Method in the next lectures. when we will look at the Stiffness Method in the next lectures.
For example, let For example, let s consider the following multiplication of s consider the following multiplication of A B A B
(
=
(
(
(
=
21
11
32 31
22 21
12 11
B
B
B
B B
B B
B B
(
=
(
(
(
(
=
22 21
12 11
43 42 41
33 32 31
23 22 21
13 12 11
A A
A A
A
A A A
A A A
A A A
A A A
where: where:
[ ]
12 11 11
A A = A [ ]
13 12
A = A
(
(
(
=
42 41
32 31
22 21
21
A A
A A
A A
A
(
(
(
=
43
33
23
22
A
A
A
A
(
=
22 21
12 11
11
B B
B B
B
[ ]
32 31 21
B B = B
47 47
Matrix algebra Matrix algebra
and carrying out the multiplication (term by term) and carrying out the multiplication (term by term)
=
(
(
(
(
(
(
(
=
32 31
22 21
12 11
43 42 41
33 32 31
23 22 21
13 12 11
B B
B B
B B
A A A
A A A
A A A
A A A
AB
(
(
(
(
+ + + +
+ + + +
+ + + +
+ + + +
=
32 43 22 42 12 41 31 43 21 42 11 41
32 33 22 32 12 31 31 33 21 32 11 31
32 23 22 22 12 21 31 23 21 22 11 21
32 13 22 12 12 11 31 13 21 12 11 11
B A B A B A B A B A B A
B A B A B A B A B A B A
B A B A B A B A B A B A
B A B A B A B A B A B A
48 48
Matrix algebra Matrix algebra
while carrying out the multiplication using the while carrying out the multiplication using the
sub sub- -matrices obtained from the partitioning matrices obtained from the partitioning
(
+
+
=
(
=
21 22 11 21
21 12 11 11
21
11
22 21
12 11
B A B A
B A B A
B
B
A A
A A
AB
NOTE: NOTE:
it is obvious that the use of sub it is obvious that the use of sub- -matrices (obtained from matrices (obtained from
partitioning) can lead to a more COMPACT notation partitioning) can lead to a more COMPACT notation
A numerical example will now be carried out to A numerical example will now be carried out to
outline the use of this approach. outline the use of this approach.
9
49 49
Matrix algebra Matrix algebra
EXAMPLE EXAMPLE
10: 10:
(
=
(
(
(
=
21
11
9 7
1 1
3 2
B
B
B
(
=
(
(
(
(
=
22 21
12 11
1 5 0
9 4 11
7 5 3
4 3 2
A A
A A
A
where: where:
[ ] 3 2
11
= A [ ] 4
12
= A
(
(
(
=
5 0
4 11
5 3
21
A
(
(
(
=
1
9
7
22
A
(
=
1 1
3 2
11
B
[ ] 9 7
21
= B
50 50
Matrix algebra Matrix algebra
and performing and performing
the multiplication ... the multiplication ...
[ ] [ ] 9 7
1 1
3 2
3 2
11 11
=
(
= B A [ ][ ] [ ] 36 28 9 7 4
21 12
= = B A
(
(
(
=
(
(
(
(
=
5 5
37 26
14 11
1 1
3 2
5 0
4 11
5 3
11 21
B A [ ]
(
(
(
=
(
(
(
=
9 7
81 63
63 49
9 7
1
9
7
21 22
B A
(
+
+
=
(
=
21 22 11 21
21 12 11 11
21
11
22 21
12 11
B A B A
B A B A
B
B
A A
A A
AB
[ ] [ ]
(
(
(
(
=
(
(
(
(
(
(
(
+
(
(
(
+
=
14 12
118 89
77 60
45 35
9 7
81 63
63 49
5 5
37 26
14 11
36 28 9 7
AB
51 51
Matrix algebra Matrix algebra
otherwise, working with the whole matrices the calculation otherwise, working with the whole matrices the calculation
would have been much more tedious (and it would have been would have been much more tedious (and it would have been
easier to make mistakes). easier to make mistakes).
52 52
Matrix algebra Matrix algebra
SOLVING A SYSTEM OF EQUATIONS SOLVING A SYSTEM OF EQUATIONS
or or
A typical system of equations which we will be dealing with in A typical system of equations which we will be dealing with in
this Unit of Study is: this Unit of Study is:
3 3 33 2 32 1 31
2 3 23 2 22 1 21
1 3 13 2 12 1 11
b x A x A x A
b x A x A x A
b x A x A x A
= + +
= + +
= + +
(
(
(
=
(
(
(
(
(
(
3
2
1
3
2
1
33 32 31
23 22 21
13 12 11
b
b
b
x
x
x
A A A
A A A
A A A
which can also be written in matrix which can also be written in matrix
form as form as
b Ax =
There are different methods of solving this system. We will There are different methods of solving this system. We will
consider the following ones: consider the following ones:
Method based on matrix algebra Method based on matrix algebra
Cramer Cramer s rule s rule
Triangulation method (Gauss elimination) Triangulation method (Gauss elimination)
53 53
Matrix algebra Matrix algebra
First we need to introduce the INVERSE of a matrix as First we need to introduce the INVERSE of a matrix as
follows: follows:
I A A AA = =
1 1
This expression outlines that the identity matrix This expression outlines that the identity matrix I I is obtained is obtained
by multiplying a matrix (say by multiplying a matrix (say A A) by its inverse (which is ) by its inverse (which is
referred to as referred to as A A
- -1 1
). ).
b Ax =
The system of equations can then be solved as: The system of equations can then be solved as:
b A Ax A
1 1
= pre pre- -multiplying both sides by multiplying both sides by A A
- -1 1
b A Ix
1
=
b A x
1
=
and simplifying and simplifying
Now, the only problem left to be able to get to the solution Now, the only problem left to be able to get to the solution x x
is to calculate the inverse of is to calculate the inverse of A A, i.e. , i.e. A A
- -1 1
. This will be . This will be
covered in following slides. covered in following slides.
METHOD BASED ON MATRIX ALGEBRA METHOD BASED ON MATRIX ALGEBRA
54 54
Matrix algebra Matrix algebra
This method is very useful for those cases which require the This method is very useful for those cases which require the
calculation of just one or a few unknowns. calculation of just one or a few unknowns.
For example, to solve for For example, to solve for x x
1 1
in our previous system: in our previous system:
CRAMER CRAMER S RULE S RULE
A
33 32 3
23 22 2
13 12 1
1
A A b
A A b
A A b
x =
where | where |A A| refers to the determinant of | refers to the determinant of
A A, and the operator || denotes the , and the operator || denotes the
determinant of the matrix inside the determinant of the matrix inside the
two vertical bars. two vertical bars.
The RULE is based on the following concept: The RULE is based on the following concept:
Column 1 has been deleted and substituted with the column of Column 1 has been deleted and substituted with the column of
known values known values b b as we wanted to calculate as we wanted to calculate x x
1 1
. Generally, we . Generally, we
need to substitute column need to substitute column j j of the matrix with the column of of the matrix with the column of
known coefficients when we want to calculate known coefficients when we want to calculate x x
j j
. .
Column 1 Column 1
Now, the only problem left to be able to get to the solution is Now, the only problem left to be able to get to the solution is to to
determine the determinants. This will be covered in following determine the determinants. This will be covered in following
slides. slides.
10
55 55
Matrix algebra Matrix algebra
This method is based on the following This method is based on the following
procedure illustrated using an procedure illustrated using an
example: example:
TRIANGULATION METHOD (GAUSS ELIMINATION) TRIANGULATION METHOD (GAUSS ELIMINATION)
5 5 7 2
1 3 4 4
2 2 4
3 2 1
3 2 1
3 2 1
= + +
= + +
= +
x x x
x x x
x x x
Get an expression for Get an expression for x x
1 1
from the first equation, and substitute this in all from the first equation, and substitute this in all
remaining equations. remaining equations.
2 2 4
3 2 1
+ + = x x x
1 1
1 9
7 11 12
3 2
3 2
=
=
x x
x x
and substituting and substituting
Eq.1 Eq.1
Eq.2 Eq.2
Eq.3 Eq.3
Eq.2 Eq.2
Eq.3 Eq.3
( )
( ) 5 5 7 2 4 2 2
1 3 4 2 4 2 4
3 2 3 2
3 2 3 2
= + + +
= + + +
x x x x
x x x x
56 56
Matrix algebra Matrix algebra
12
19
12
97
3
= x
Get an expression for Get an expression for x x
2 2
from the second equation, and substitute in into from the second equation, and substitute in into
the remaining equations. the remaining equations.
2 2
and substituting and substituting
Eq.3 Eq.3
12
7
12
11
3 2
+ = x x
1 9
12
7
12
11
3 3
= |
.
|
\
|
+ x x
Get an expression for Get an expression for x x
3 3
from the third equation, and from the third equation, and
substitute in into the remaining equations, or if it is substitute in into the remaining equations, or if it is
the last equation simply solve for the last equation simply solve for x x
3 3
. .
3 3
97
19
3
= x
5 5 7 2
1 3 4 4
2 2 4
3 2 1
3 2 1
3 2 1
= + +
= + +
= +
x x x
x x x
x x x
1 9
7 11 12
3 2
3 2
=
=
x x
x x Eq.1 Eq.1
Eq.2 Eq.2
Eq.3 Eq.3
Eq.2 Eq.2
Eq.3 Eq.3
Initial problem Initial problem From STEP 1 From STEP 1
FROM FROM
BEFORE BEFORE
57 57
Matrix algebra Matrix algebra
Back Back- -substitute the values of substitute the values of x x
3 3
(obtained in STEP 3) in the solutions (obtained in STEP 3) in the solutions
obtained in the previous STEPS. obtained in the previous STEPS.
4 4
12
7
12
11
3 2
+ = x x
97
19
3
= x
from STEP 1 from STEP 1
FROM FROM
BEFORE BEFORE
2 2 4
3 2 1
+ + = x x x
from STEP 2 from STEP 2
from STEP 3 from STEP 3
97
74
12
7
97
19
12
11
2
= + = x
97
64
2
97
19
2
97
74
4
1
= + + = x
58 58
Matrix algebra Matrix algebra
The Triangulation Method (Gauss Elimination) previously outlined The Triangulation Method (Gauss Elimination) previously outlined
could also be carried out in matrix form, which is shown below could also be carried out in matrix form, which is shown below
using the previous example: using the previous example:
MATRIX FORM OF GAUSS ELIMINATION MATRIX FORM OF GAUSS ELIMINATION
5 5 7 2
1 3 4 4
2 2 4
3 2 1
3 2 1
3 2 1
= + +
= + +
= +
x x x
x x x
x x x
which can be re which can be re- -written written
in matrix form as in matrix form as
(
(
(
=
(
(
(
(
(
(
5
1
2
5 7 2
3 4 4
2 4 1
3
2
1
x
x
x
Element Element A A
11 11
59 59
Matrix algebra Matrix algebra
We want to get to a situation where our matrix We want to get to a situation where our matrix A A located on located on
the left side of the equation is an Identity Matrix the left side of the equation is an Identity Matrix I I as: as:
(
(
(
=
(
(
(
(
(
(
3
2
1
3
2
1
1 0 0
0 1 0
0 0 1
b
b
b
x
x
x
Once we get it in this form, each of the unknowns Once we get it in this form, each of the unknowns x x
i i
(with (with
i i=1,2,3) can be easily determined from the equations =1,2,3) can be easily determined from the equations
expressed in each line of the matrix, as now each line expressed in each line of the matrix, as now each line
contains only one unknown. contains only one unknown.
The procedure utilised to achieve this is outlined in the The procedure utilised to achieve this is outlined in the
following. following.
60 60
Matrix algebra Matrix algebra
Let Let s look at element s look at element A A
11 11
of our matrix and if it is not equal to 1, divide the of our matrix and if it is not equal to 1, divide the
first equation by first equation by A A
11 11
in order to obtain in order to obtain A A
11 11
= 1. = 1.
1 1
(
(
(
=
(
(
(
(
(
(
5
1
2
5 7 2
3 4 4
2 4 1
3
2
1
x
x
x
In our case In our case A A
11 11
already equals 1 already equals 1
Manipulate the matrix so that all elements below Manipulate the matrix so that all elements below A A
11 11
equal zero equal zero 2 2
(
(
(
=
(
(
(
(
(
(
5
7
2
5 7 2
11 12 0
2 4 1
3
2
1
x
x
x
Applying this to all terms of line 2 yields: Applying this to all terms of line 2 yields:
A A
21 21
(new) = (new) = A A
21 21
(old) (old) - - A A
21 21
(old) (old) A A
11 11
= 4 = 4 - - 4(1) = 0 4(1) = 0
A A
22 22
(new) = (new) = A A
22 22
(old) (old) - - A A
21 21
(old) (old) A A
12 12
= 4 = 4 - - 4(4) = 4(4) = - -12 12
A A
23 23
(new) = (new) = A A
23 23
(old) (old) - - A A
21 21
(old) (old) A A
13 13
= 3 = 3 - - 4( 4(- -2) = 11 2) = 11
b b
2 2
(new) = b (new) = b
2 2
(old) (old) - - A A
21 21
(old) b (old) b
1 1
= 1 = 1 - - 4(2) = 4(2) = - -7 7
The Equation expressed in Line 2 is modified as: The Equation expressed in Line 2 is modified as:
LINE2(new) = LINE2(old) LINE2(new) = LINE2(old) A A
21 21
(old) * LINE1 (old) * LINE1
in doing so we ensure that A in doing so we ensure that A
21 21
(new)=0 as we want. (new)=0 as we want.
11
61 61
Matrix algebra Matrix algebra
(
(
(
=
(
(
(
(
(
(
1
7
2
9 1 0
11 12 0
2 4 1
3
2
1
x
x
x
Applying this to all terms of line 2 yields: Applying this to all terms of line 2 yields:
A A
31 31
(new) = (new) = A A
31 31
(old) (old) - - A A
31 31
(old) (old) A A
11 11
= 2 = 2 - - 2(1) = 0 2(1) = 0
A A
32 32
(new) = (new) = A A
32 32
(old) (old) - - A A
31 31
(old) (old) A A
12 12
= 7 = 7 - - 2(4) = 2(4) = - -1 1
A A
33 33
(new) = (new) = A A
33 33
(old) (old) - - A A
31 31
(old) (old) A A
13 13
= 5 = 5 - - 2( 2(- -2) = 9 2) = 9
b b
3 3
(new) = b (new) = b
3 3
(old) (old) - - A A
31 31
(old) b (old) b
1 1
= 5 = 5- - 2(2) = 1 2(2) = 1
The Equation expressed in Line 3 is modified as: The Equation expressed in Line 3 is modified as:
LINE3(new) = LINE3(old) LINE3(new) = LINE3(old) A A
31 31
(old) * LINE1 (old) * LINE1
in doing so we ensure that A in doing so we ensure that A
31 31
(new)=0 as we want. (new)=0 as we want.
and so on for the rest of the matrix. and so on for the rest of the matrix.
(The numerical steps are outlined in the following) (The numerical steps are outlined in the following)
3 3
(
(
(
=
(
(
(
(
(
(
1
12
7
2
9 1 0
12
11
1 0
2 4 1
3
2
1
x
x
x
62 62
Matrix algebra Matrix algebra
(
(
(
(
=
(
(
(
(
(
(
(
12
19
12
7
2
12
97
0 0
12
11
1 0
2 4 1
3
2
1
x
x
x
(
(
(
(
=
(
(
(
(
(
(
97
19
12
7
2
1 0 0
12
11
1 0
2 4 1
3
2
1
x
x
x
(
(
(
(
=
(
(
(
(
(
(
97
19
97
74
2
1 0 0
0 1 0
2 4 1
3
2
1
x
x
x
(
(
(
(
=
(
(
(
(
(
(
97
19
97
74
97
232
1 0 0
0 1 0
0 4 1
3
2
1
x
x
x
(
(
(
(
=
(
(
(
(
(
(
97
19
97
74
97
64
1 0 0
0 1 0
0 0 1
3
2
1
x
x
x
(
(
(
(
=
(
(
(
97
19
97
74
97
64
3
2
1
x
x
x
63 63
Matrix algebra Matrix algebra
DETERMINANT DETERMINANT
For the scope of this revision we will re For the scope of this revision we will re- -visit the determinants of visit the determinants of
matrices 2x2 and 3x3, which are calculated as follows: matrices 2x2 and 3x3, which are calculated as follows:
(
=
22 21
12 11
A A
A A
A ( )
21 12 22 11
det A A A A = = A A
EXAMPLE 11: EXAMPLE 11:
(
=
4 3
2 1
A ( )( ) ( )( ) 2 3 2 4 1 = = A
NOTE: NOTE: When the determinant of a matrix (say When the determinant of a matrix (say A A) is ZERO, the ) is ZERO, the
matrix is said to be SINGULAR and the matrix cannot be matrix is said to be SINGULAR and the matrix cannot be
inverted (i.e. the operation inverted (i.e. the operation A A
- -1 1
cannot be carried out) cannot be carried out)
MATRIX 2x2 MATRIX 2x2
64 64
Matrix algebra Matrix algebra
(
(
(
=
33 32 31
23 22 21
13 12 11
A A A
A A A
A A A
A
( ) + + + = =
13 32 21 31 23 12 33 22 11
det A A A A A A A A A A A
EXAMPLE 12: EXAMPLE 12:
(
(
(
=
9 4 11
7 5 3
4 3 2
A 12 = A
MATRIX 3x3 MATRIX 3x3
( )
23 32 11 33 12 21 31 22 13
A A A A A A A A A + +
65 65
Matrix algebra Matrix algebra
(
(
(
(
=
nn n n
n
n
a a a
a a a
a a a
2 1
2 22 21
1 12 11
A
( )
jn jn j j j j
C a C a C a + + + = = ... det
2 2 1 1
A A
where where ( )
jk
k j
jk
M C
+
= 1
And in the most general case: MATRIX And in the most general case: MATRIX nxn nxn
where where j j = 1 or 2 or = 1 or 2 or or or n n
( )
nk nk k k k k
C a C a C a + + + = = ... det
2 2 1 1
A A
where where k k = 1 or 2 or = 1 or 2 or or or n n
M M
jk jk
= MINOR of = MINOR of a a
jk jk
in in det( det(A A) = determinant of order n ) = determinant of order n- -1 1
removing the removing the j j- -th th row and the row and the k k- -th th column column
C C
jk jk
= COFACTOR of = COFACTOR of a a
jk jk
in in det( det(A A) )
66 66
Matrix algebra Matrix algebra
(
(
(
(
=
nn n n
n
n
B B B
B B B
B B B
2 1
2 22 21
1 12 11
B
MINOR of a matrix MINOR of a matrix
EXAMPLES of MINORS of EXAMPLES of MINORS of B B
The MINOR of a matrix The MINOR of a matrix B B ( (n nx xn n) can be any sub ) can be any sub- -matrix of matrix of B B of of
order order p px xp p where where p p< <n n. .
(
(
(
=
nn n
n
B B
B B
2
2 22
D
(
(
(
2 2 3 2
2 3 33
n n n
n
B B
B B
E
12
67 67
Matrix algebra Matrix algebra
(
(
(
(
=
8 0 1 7
10 9 8 2
0 4 3 5
3 5 2 1
B
and other numerical EXAMPLES and other numerical EXAMPLES
(
=
9 8
4 3
D
(
(
(
=
9 8 2
4 3 5
5 2 1
E
68 68
Matrix algebra Matrix algebra
( )
jn jn j j j j
C a C a C a + + + = = ... det
2 2 1 1
A A
Let Let s calculate the determinant of a matrix using: s calculate the determinant of a matrix using:
Let Let s use s use j j = 1. So, the determinant can be calculated as: = 1. So, the determinant can be calculated as:
This can be re This can be re- -written for the following 3x3 matrix written for the following 3x3 matrix A A as as
(
(
(
=
9 8 2
4 3 5
5 2 1
A
( )
n n
C a C a C a
1 1 12 12 11 11
... det + + + = = A A
( )
13 13 12 12 11 11
det C a C a C a + + = = A A
69 69
Matrix algebra Matrix algebra
5 8 4 9 3
9 8
4 3
11
= = = M
So, the relevant minors can be calculated as: So, the relevant minors can be calculated as:
The cofactors can then be calculated based on The cofactors can then be calculated based on ( )
jk
k j
jk
M C
+
= 1
37 2 4 9 5
9 2
4 5
12
= = = M
34 2 3 8 5
8 2
3 5
13
= = = M
( ) ( ) 5 5 1
1 1
11
= =
+
C
( ) ( ) 37 37 1
2 1
12
= =
+
C
( ) ( ) 34 34 1
3 1
13
= =
+
C
70 70
Matrix algebra Matrix algebra
So, the determinant can now be calculated as: So, the determinant can now be calculated as:
And substituting the calculated values And substituting the calculated values
( )
13 13 12 12 11 11
det C a C a C a + + = = A A
( ) ( ) ( ) 91 34 5 37 2 5 1 det = + + = = A A
71 71
Matrix algebra Matrix algebra
INVERSE OF A MATRIX INVERSE OF A MATRIX
Let Let s first look at the case of a s first look at the case of a 2x2 matrix 2x2 matrix. .
(
=
22 21
12 11
A A
A A
A
(
11 21
12 22 1
1
A A
A A
A
A
21 12 22 11
A A A A = A
where: where:
EXAMPLE 13: EXAMPLE 13:
(
=
4 3
2 1
A ( )( ) ( )( ) 2 3 2 4 1 = = A
First calculate the DETERMINANT. Calculate the inverse matrix First calculate the DETERMINANT. Calculate the inverse matrix
only if the matrix is NOT SINGULAR (i.e. the determinant is not only if the matrix is NOT SINGULAR (i.e. the determinant is not
equal to 0) equal to 0)
(
1 3
2 4
2
1
1
A
It is obvious that if It is obvious that if det( det(A A)=0, then the coefficients of the inverse )=0, then the coefficients of the inverse
matrix would tend to infinity as 1/ matrix would tend to infinity as 1/det( det(A A)=1/0 )=1/0 . .
72 72
Matrix algebra Matrix algebra
(
(
(
(
=
nn n n
n
n
A A A
A A A
A A A
2 1
2 22 21
1 12 11
A
where where
( )
T
C
A
A
det
1
1
=
and in the most general case: MATRIX and in the most general case: MATRIX nxn nxn
C C
jk jk
= COFACTOR of = COFACTOR of a a
jk jk
in in det( det(A A) )
C C = matrix containing all cofactors = matrix containing all cofactors
Try to see how you would calculate the inverse of a Try to see how you would calculate the inverse of a
matrix 3x3. matrix 3x3.