0% found this document useful (0 votes)
15 views39 pages

EME4403 Finite Element

The document discusses matrix operations including addition, subtraction, multiplication, and transposition of matrices. It provides examples of how to perform these operations and defines key matrix types such as identity and zero matrices.

Uploaded by

Ammar muhammad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views39 pages

EME4403 Finite Element

The document discusses matrix operations including addition, subtraction, multiplication, and transposition of matrices. It provides examples of how to perform these operations and defines key matrix types such as identity and zero matrices.

Uploaded by

Ammar muhammad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

EME4403

Finite Element Analysis


Linear Algebra Recap
(Week 2)

PowerPoint® Slides
By Ir. Dr. Patrick Teo
Compulsory page

Learning Objectives

• Describe fundamental mathematic in linear algebra.


• Recognize the interactive steps associated with the
matrix has ‘n’ rows and ‘m’ columns.
• Understand the process involved in improving a matrix
operation.
• Identify other matrix such as inverse matrix, cofactor
method, and differentiation quadratic form.

Last Updated: Last Updated:October 19, 2023 © I-Station Solutions Sdn Bhd 2
Compulsory page

Learning Outcomes

• Students are required to understand linear algebra.


• To gain good understanding of matrix operation.
• Students are able to recognize different type of matrix.
• Students will understand the importance of learning
matrix operation in finite elements method.

Last Updated: Last Updated:October 19, 2023 © I-Station Solutions Sdn Bhd 3
What is a matrix?
A rectangular array of numbers (we will
concentrate on real numbers). A n x m matrix
has ‘n’ rows and ‘m’ columns
M11 M12 M13 M14  First row
M 3x4 
 M 21 M 22 M 23 
M 24  Second row
M31 M32 M33 M34  Third row

First Second Third Fourth


column column columncolumn

M12 Row number


Column number
Last Updated: © I-Station Solutions Sdn Bhd 4
What is a vector?

A vector is an array of ‘n’ numbers


A row vector of length ‘n’ is a 1 x n matrix

a 1 a2 a3 a4
A column vector of length ‘m’ is a mx1
matrix
 a1 
a 
 2
a3 

Last Updated: © I-Station Solutions Sdn Bhd 5


Special matrices

Zero matrix: A matrix all of whose entries are zero


0 0 0 0 
03x 4 
 0 0 0 0 
0 0 0 0
Identity matrix: A square matrix which has ‘1’ s on the diagonal
and
zeros everywhere else.
1 0 0
I3x 3 
  0 1 0
0 0 1

Last Updated: © I-Station Solutions Sdn Bhd 6


Matrix Operations: Equality of matrices

If A and B are two matrices of the same size,


then they are “equal” if each and every entry of one
matrix equals the corresponding entry of the other.

 1 2 4 a b c 
  
A   3 0 7  B   d e f  
 9 1 5   g h i 
a  1, b  2, c  4,
A  B  d  3, e  0, f  7,
g  9, h  1, i  5.

Last Updated: © I-Station Solutions Sdn Bhd 7


Matrix operations: Addition of two matrices
If A and B are two matrices of the same size,
then the sum of the matrices is a matrix C=A+B whose
entries are the sums of the corresponding entries of A
and B
 1 2 4   1 3 10 
  
A    3 0 7 B    3 1 0  
 9 1 5  1 0 6 
 0 5 14 
C  A  B    6 1 7 
 10 1 11 
Last Updated: © I-Station Solutions Sdn Bhd 8
Matrix operations: Addition of of matrices

Properties of matrix addition:


1. Matrix addition is commutative (order of
addition does not matter)
AB B A
2. Matrix addition is associative
A  B  C   A  B   C
3. Addition of the zero matrix
A00A  A

Last Updated: © I-Station Solutions Sdn Bhd 9


Matrix operations: Multiplication by a scalar

If A is a matrix and c is a scalar, then the product cA is a


matrix whose entries are obtained by multiplying each of
the entries of A by c

1 2 4
A    3 0 7 c  3
 9 1 5
 3 6 12 

cA    9 0 21 
 27 3 15 
Last Updated: © I-Station Solutions Sdn Bhd 10
Matrix operations: Multiplication by a scalar
If A is a matrix and c =-1 is a scalar, then the product
(-1)A =-A is a matrix whose entries are obtained by
multiplying each of the entries of A by -1
 1 2 4
A    3 0 7 c  1
 9 1 5
1 2  4

cA  -A   3 0  7
  9 1  5

Last Updated: © I-Station Solutions Sdn Bhd 11


Matrix operations: Subtraction

If A and B are two square matrices of the same


size, then A-B is defined as the sum A+(-1)B

 1 2 4   1 3 10 
  
A    3 0 7 B    3 1 0  
 9 1 5  1 0 6 
 2  1  6

C  A  B  0  1 7  
8 1  1
Note that A - A  0 and 0 - A  -A
Last Updated: © I-Station Solutions Sdn Bhd 12
Special operations: Transpose

If A is a m x n matrix, then the transpose of A


is the n x m matrix whose first column is the
first row of A, whose second column is the
second column of A and so on.
 1 2 4 1  3 9
  
A   3 0 7   A  2
T
0 1
 9 1 5   4 7 5

Last Updated: © I-Station Solutions Sdn Bhd 13


Special operations: Transpose

If A is a square matrix (mxm), it is called


symmetric if

AA T

Last Updated: © I-Station Solutions Sdn Bhd 14


Matrix operations: Scalar (dot) product of two vectors

If a and b are two vectors of the same size


 a1   b1 
 
a  a 2 ; b  b 
 2
a 3  b3 
The scalar (dot) product of a and b is a scalar
obtained by adding the products of
corresponding entries of the two vectors

a b   a 1b1  a 2 b 2  a 3 b 3 
T

Last Updated: © I-Station Solutions Sdn Bhd 15


Matrix operations: Matrix multiplication

For a product to be defined, the number of columns


of A must be equal to the number of rows of B.

A B = AB
mxr rxn mxn
inside

outside

Last Updated: © I-Station Solutions Sdn Bhd 16


Matrix operations: Matrix multiplication
If A is a mxr matrix and B is a rxn matrix, then
the product C=AB is a mxn matrix whose
entries are obtained as follows. The entry
corresponding to row ‘i’ and column ‘j’ of C is
the dot product of the vectors formed by the
row ‘i’ of A and column ‘j’ of B
1 2 4  1 3
A 3x3   3 0 7  B3x2   3 1 
 9 1 5   1 0 
T
 3 5   1  1
C3x2  AB  10 9  notice  2   3  3
 
 7 28   4   1 
Last Updated: © I-Station Solutions Sdn Bhd 17
Matrix operations: Multiplication of matrices
Properties of matrix multiplication:
1. Matrix multiplication is noncommutative
(order of addition does matter)
AB  BA in ge ne ra l

· It may be that the product AB exists but BA


does not (e.g. in the previous example
C=AB is a 3x2 matrix, but BA does not
exist)
· Even if the product exists, the products AB
and BA are not generally the same
Last Updated: © I-Station Solutions Sdn Bhd 18
Matrix operations: Multiplication of matrices
2. Matrix multiplication is associative
A BC   AB C
3. Distributive law
A B  C   AB  AC
B  C A  BA  CA
4. Multiplication by identity matrix
AI  A; IA  A
5. Multiplication by zero matrix
A0  0 ; 0 A  0
A B 
6. T T T
B A
Last Updated: © I-Station Solutions Sdn Bhd 19
Matrix operations: Miscellaneous properties
1. If A , B and C are square matrices of the
same size, and A  0 then AB  AC
does not necessarily mean that B  C
2. AB  0 does not necessarily imply that
either A or B is zero

Last Updated: © I-Station Solutions Sdn Bhd 20


Inverse of a matrix: Introduction
If A is any square matrix and B is another
square matrix satisfying the conditions

A B  BA  I
Then
(a)The matrix A is called invertible, and
(b) the matrix B is the inverse of A and is
denoted as A-1.

The inverse of a matrix is unique

Last Updated: © I-Station Solutions Sdn Bhd 21


Inverse of a matrix: Uniqueness
The inverse of a matrix is unique
Assume that B and C both are inverses of A
AB  BA  I
AC  CA  I
(BA)C  IC  C
B(AC)  BI  B
BC
Hence a matrix cannot have two or more
inverses.

Last Updated: © I-Station Solutions Sdn Bhd 22


Inverse of a matrix: Properties
Property 1: If A is any invertible square matrix
the inverse of its inverse is the matrix A itself

A -1  1
A
Property 2: If A is any invertible square matrix
and k is any scalar then

1 -1
k A  1
 A
k

Last Updated: © I-Station Solutions Sdn Bhd 23


Inverse of a matrix: Properties
Property 3: If A and B are invertible square
matrices then

A B  1
B A
1 -1

(AB) AB   I
1

Premultiplying both sides by A-1


A (AB) AB   A 1
-1 1

A ABAB 
-1 1
 A 1
BAB   A 1
1

Premultiplying both sides by B-1


AB 1  B 1A 1
Last Updated: © I-Station Solutions Sdn Bhd 24
What is a determinant?

The determinant of a square matrix is a number


obtained in a specific manner from the matrix.

For a 1x1 matrix:


A  a 1 1  ; det( A )  a 1 1
For a 2x2 matrix:

 a11 a12 
A  ; det( A )  a11a 22  a12a 21
a 21 a 22 

Product along red arrow minus product along blue arrow


Last Updated: © I-Station Solutions Sdn Bhd 25
Example 1

1 3 
Consider the matrix A 
 5 7 

Notice (1) A matrix is an array of numbers


(2) A matrix is enclosed by square brackets

1 3
det( A )   1  7  3  5  8
5 7

Notice (1) The determinant of a matrix is a number


(2) The symbol for the determinant of a matrix is
a pair of parallel lines

Last Updated: © I-Station Solutions Sdn Bhd 26


Duplicate column method for 3x3 matrix

ForONLY
a11 a12 
a13matrix
a 3x3  a11
write down 13  atwo
a12theafirst 11 a12
  a
A  a 21 a 22 a 23 third column
columns after the a
 21 a 22 a 23  21 a 22
a 31 a 32 a 33  a 31 a 32 a 33  a 31 a 32

Sum of products along red arrow


minus sum of products along blue arrow

det( A )  a 11a 22a 33  a 12a 23a 31  a 13a 21a 32


 a 13a 22a 31  a 11a 23a 32  a 12a 21a 33
This technique works only for 3x3 matrices

Last Updated: © I-Station Solutions Sdn Bhd 27


Example

2 4 - 3  2 4  3 2 4
A   1 0 4 

1 0 
4 1 0
 2 - 1 2  
 2  1 2  2 1

0 -8 8 0 32 3
Sum of red terms = 0 + 32 + 3 = 35
Sum of blue terms = 0 – 8 + 8 = 0
Determinant of matrix A= det(A) = 35 – 0 = 35

Last Updated: © I-Station Solutions Sdn Bhd 28


Finding determinant using inspection

Special case. If two rows or two columns are


proportional (i.e. multiples of each other), then the
determinant of the matrix is zero:
2 7 8
3 2 4 0
2 7 8

because rows 1 and 3 are proportional to each other

If the determinant of a matrix is zero, it is called a


singular matrix

Last Updated: © I-Station Solutions Sdn Bhd 29


Cofactor method

If A isaa11square a13 
a12 matrix
A  a 21 a 22 a 23 
a 31 a 32 a 33 
The minor, Mij, of entry aij is the determinant of the submatrix
that remains after the ith row and jth column are deleted from A.
The cofactor of entry aij is Cij=(-1)(i+j) Mij
a 21 a 23
M 12   a 21a 33  a 23a 31
a 31 a 33
a 21 a 23
C12   M 12  
a 31 a 33
Last Updated: © I-Station Solutions Sdn Bhd 30
What is a cofactor?

Sign of cofactor  - 
-  -
 

 - 

Find the minor and cofactor of a33
2 4 - 3 
A   1 0 4 
 Minor 2 4
 2 - 1 2  M 33   2  0  4  1  4
1 0

Cofactor C  (  1) ( 3  3 ) M  M   4
33 33 33

Last Updated: © I-Station Solutions Sdn Bhd 31


Cofactor method of obtaining the determinant of
a matrix
The determinant of a n x n matrix A can be computed by
multiplying ALL the entries in ANY row (or column) by
their cofactors and adding the resulting products. That
is, for each and
1 i  n 1 j  n

Cofactor expansion along the jth column

det( A )  a 1j C 1j  a 2j C 2j    a n jC n j

Cofactor expansion along the ith row

det( A )  a i1C i1  a i2 C i2    a inC in


Last Updated: © I-Station Solutions Sdn Bhd 32
Example: evaluate det(A) for:

1 0 2 -3
A= 3 4 0 1
det(A) = a11C11 +a12C12 + a13C13 +a14C14
-1 5 2 -2
0 1 1 3

4 0 1 3 0 1 3 4 1
5 2 -2 -1 2 -2 -1 5 -2
det(A)=(1) 1 1 3 - (0) 0 1 3 +2 0 1 3

3 4 0
-1 5 2 = (1)(35)-0+(2)(62)-(-3)(13)=198
- (-3) 0 1 1

Last Updated: © I-Station Solutions Sdn Bhd 33


Example :
1 5 -3
1 0 2
det(A)= 3 -1 2

By a cofactor along the third column

det(A)=a13C13 +a23C23+a33C33

1 0 1 5 1 5
det(A)= -3* (-1)4 +2*(-1)5 +2*(-1)6
3 -1 3 -1 1 0

= det(A)= -3(-1-0)+2(-1)5(-1-15)+2(0-5)=25

Last Updated: © I-Station Solutions Sdn Bhd 34


Quadratic form
The scalar Ud kd d
T  vector
k  square matrix
Is known as a quadratic form

If U>0: Matrix k is known as positive definite


If U≥0: Matrix k is known as positive semidefinite

Last Updated: © I-Station Solutions Sdn Bhd 35


Quadratic form

 d1   k11 k12 
Let d  k   Symmetric
d 2   k 21 k 22  matrix

Then
 k11 k12   d1 
U  d k d  d1 d 2 
T
  
k12 k 22  d 2 
 k11d1  k12 d 2 
 d1 d 2  
k12 d1  k 22 d 2 
 d1 (k11d1  k12 d 2 )  d 2 (k12 d1  k 22 d 2 )
2 2
 k11d1  2k12 d1 d 2  k 22 d 2
Last Updated: © I-Station Solutions Sdn Bhd 36
Differentiation of quadratic form

Differentiate U wrt d1
U
 2 k 11 d 1  2 k 12 d 2
d 1
Differentiate U wrt d2
U
 2 k 12 d 1  2 k 22 d 2
d 2

Last Updated: © I-Station Solutions Sdn Bhd 37


Differentiation of quadratic form
Hence

 U 
U  d 1   k11 k12   d 1 
   2   
 d  U  k12 k 22  d 2 
 d 2 
2k d

Last Updated: © I-Station Solutions Sdn Bhd 38


References

1) Daryl Logan, A First Course in the Finite Element


Method, 5th Edition, Cengage Learning, Prentice Hall,
2011
2) K. J. Bathe, Finite Element Procedures, 1st Edition,
Prentice Hall, 2007
3) Alan Jeffrey, Matrix Operations for Engineers and
Scientists: An Essential Guide in Linear Algebra,
Springer Science+Business Media, 2010
4) Richard A. Brualdi, Dragos Cvetkovic, A Combinatorial
Approach to Matrix Theory and Its Applications, CRC
Press, 2009

Last Updated: Last Updated:October 19, 2023 © I-Station Solutions Sdn Bhd 39 39

You might also like