Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

Salwani binti Mohd Salleh

salwani@ump.edu.my
A01-G-19
 
 MATRIX => rectangular array of numbers

a 11 a 12 a 13 a 14  First row

= a 21 a 22 
M 3x4 a 23 a 24  Second row
a 31 a 32 a 33 a 34  Third row
Matrix
size
mxn First Second Third Fourth
column column column column

Entries a 12
M Row number
Column number
CHAPTER 2: REVIEW OF MATRIX ALGEBRA
 VECTOR=> an array of ‘n’ numbers

 Row vector a 1 a2 a3 a4  (1xn matrix)

 a1 
a 
 Column vector (mx1 matrix)
 2
a3 

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


square matrix is a matrix that
have the same number of row
and column

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


 symmetric matrix is a matrix that even when transposed, its
resulting matrix components do not change:

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


 transpose is a process
that changes the
position of matrix
components from [aij]
to [aji]

 transpose is denoted
by superscript “T”

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


2 3 0 4 
a=  b=  c = 2 1
 1 5 1 1 

1) X = a T

2) Y = bc T

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


 determinant is a scalar value that is unique for a given
square matrix

 determinant of matrix [A] is written as |A|

 for a 2X2 matrix, its determinant can be determined using


this method:

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


 c11 c12 c13  c11 c12
b11 b12 
A = a11  B=  C = c21 c22 c23  c21 c22
b21 b22  c31 c32 c33  c31 c32

1) det[A] = 𝑎11

2) det[𝐵] = 𝑏11 𝑏22 − 𝑏12 𝑏21

3) det[𝐶] = 𝑐11 𝑐22 𝑐33 + 𝑐12 𝑐23 𝑐31 + 𝑐13 𝑐21 𝑐32
− 𝑐13 𝑐22 𝑐31 − 𝑐11 𝑐23 𝑐32 − 𝑐12 𝑐21 𝑐33

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


2 4 − 3
2 1   
A = 2 B=  C = 1 0 4
0 4
2 − 1 2 
1) det[A] = ?

2) det[𝐵] = ?

3) det[𝐶] = ?

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


 If two rows or two columns are PROPORTIONAL (ie.
Multiples of each other), then the determinant of the matrix
is zero.

2 4 − 3

C= 1 0 
4   det(C ) = 0
− 4 − 8 6 
 If a matrix has a row or a column with all elements equal to
0, then its determinant is 0
 If the determinant of a matrix is zero, it is called a singular
matrix. CHAPTER 2: REVIEW OF MATRIX ALGEBRA
 addition (or subtraction) of matrices is done by adding (or
subtracting) the values of the components that are on the
same row and same column on both (or more) respective
matrices

 the size of the matrices that we want to add or subtract


must be the same

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


CHAPTER 2: REVIEW OF MATRIX ALGEBRA
2 3 0 4 
a=  b=  c = 2 1
 1 5 1 1 

1) X = a + b 3) Z = a − b

2) Y = b + c 4) U = b − c

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


 if a matrix is multiplied by a scalar, all the components of
the matrix must be multiplied by the scalar

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


 the multiplication of two matrices is called the product of
two matrices

 to multiply two matrices, the 1st matrix’s number of


columns must be the same with the 2nd matrix’s number of
rows

 in other words:

for [A] and [B] to multiply =>>

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


2×3 matrix 3×2 matrix

2×2 matrix

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


 2
2 3 0 4   
a=  b=  c = 2 1 d = 0 
 1 5 1 1  1 

1) X = 3a 3) Z = bc

2) Y = ab 4) U = cd

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


 for matrix differentiation (or integration), all the
components of a matrix must be differentiated (or
integrated) in a conventional manner

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


 x3 2x2 3x x2 xy xz 
 2   
a  = 2 x x 4
x b =  xy y 2
yz 
 3x x x 5   xz yz z 2 
 

d a  b
1) =? 2) =?
dx x

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


3 x 2 4x 3 
 
a  =  4 x 4 x3 1 
 3 1 4
5x 

 a dx = ?
CHAPTER 2: REVIEW OF MATRIX ALGEBRA
1. Find for [W].

1 3 −1
3 −2 4 2
[A] = [B] = −2 −6 1 [C] = [D] =
4 −2 2 5
3 5 −2

[W] = [A] – [C] [D]T

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


2. Find for determinants and show your calculation

1 3 2 2 −3 1
[A] == −3 −1 −3 [B] = 2 0 −1
2 3 1 1 4 5

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


 imagine a large number of linear equations (a system of
linear equations):

 where a and b are known coefficients, and x are unknown


variables
CHAPTER 2: REVIEW OF MATRIX ALGEBRA
 this equations can be rewritten in matrix form:

 [A] is a square matrix of the size (mxn), {x} and {b} are
vectors with the size (nx1)

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


 The finite element method leads to a system of equations
that must be solved simultaneously
 To solve these equations one by one would take a long time
and a lot of work
 Two methods to solve linear equations:
✓ Cramer’s Rule
✓ Gauss Elimination

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


 Given a system of linear algebraic equation in n unknowns xi
(i=1,2,...n) expressed in matrix form as;

where f is known, solutions are given by the ratio of determinants:

provided |A| is not zero.

 Matrices [Ai] are formed by replacing the i-th column of


the coefficient matrix [A] with the right-hand side column
matrix (which in this case {f}).
CHAPTER 2: REVIEW OF MATRIX ALGEBRA
 Let say if we have two equations with two unknown
variables

ax + by = c
dx + ey = f

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


ax + by = c Lets eliminate y
aex + bey = ce
dx + ey = f bdx + bey = bf
aex − bdx = ce − bf
x(ae − bd) = ce − bf
c b
ce − bf f e
x= x=
ae − bd a b
d e
CHAPTER 2: REVIEW OF MATRIX ALGEBRA
If we apply the same process but eliminate x

a c
af − cd d f
y= y=
ae − bd a b
d e

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


ax + by = c
Given a system
dx + ey = f
Replace solutions in Replace solutions in
x-column to solve for x y-column to solve for y

c b a c
f e d f
x= y=
a b a b
d e d e
Denominators are
coefficient determinants
CHAPTER 2: REVIEW OF MATRIX ALGEBRA
8𝑥 + 5𝑦 = 2
Solve the system by using Cramer’s Rule:
2𝑥 − 4𝑦 = -10

2 5
− 10 − 4 − 8 − (−50) 42
x= = = = −1
− 42 − 42 − 42
8 2
2 − 10 − 80 − 4 − 84
y= = = =2
− 42 − 42 − 42
CHAPTER 2: REVIEW OF MATRIX ALGEBRA
Solve the system by using Cramer’s Rule:

𝑥 + 3𝑦 − 𝑧 = 1
−2𝑥 − 6𝑦 + 𝑧 = -3
3𝑥 + 5𝑦 − 2𝑧 = 4

𝒙, 𝒚, 𝒛 = (𝟐, 𝟎, 𝟏)
CHAPTER 2: REVIEW OF MATRIX ALGEBRA
 The purpose of Gauss Elimination is to perform the transformation
of the matrix below to eliminate unknown from a system so that
the solution can be obtained using “back substitution” into the
remaining equations.

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


 In order to do that, a sequence of operations is performed
on the corresponding matrix of coefficients.
 The method proceeds along the following steps:
▪ Interchange and equation (or ).
▪ Divide the equation by (or ).
▪ Add times the equation to the equation (or ).
▪ Add times the equation to the equation (or ).
▪ Multiply the equation by (or ).
 the process continues until it has reached its upper
triangular matrix, or (unreduced) row echelon form.

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


Solve the following set of simultaneous equations.

2 x1 + 2 x2 + 1x3 = 9 …R1
2 x1 + 1x2 = 4 …R2
1x1 + 1x2 + 1x3 = 6 …R3

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


STEP 1: Eliminate the coefficient of x1 in every
equation except the first one.

2 x1 + 2 x2 + 1x3 = 9 …R1
2 x1 + 1x2 = 4 …R2
1x1 + 1x2 + 1x3 = 6 …R3

R1’= R1 => 2 x1 + 2 x2 + 1x3 = 9


R2’ = R1 – R2 => 0 x1 + 1x2 + 1x3 = 5
R3’ = R1 – 2R3 => 0 x1 + 0 x2 − 1x3 = −3
CHAPTER 2: REVIEW OF MATRIX ALGEBRA
STEP 2: Eliminate the coefficient of x2 in every
equation below the second equation. In this case,
it is already accomplished in STEP 1.
2 x1 + 2 x2 + 1x3 = 9
0 x1 + 1x2 + 1x3 = 5
0 x1 + 0 x2 − 1x3 = −3
STEP 3: Solve for x3, x2 and x1
x3 = 3
x2 = 2
x1 = 1
CHAPTER 2: REVIEW OF MATRIX ALGEBRA
Solve the following set of simultaneous equations by
Gaussian Elimination
x1 − 4 x2 − 5 x3 = 4
3 x2 + 4 x3 = −1
− 2 x1 − 1x2 + 2 x3 = −3

x3 = 0.5
x2 = −1
x1 = 2.5

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


1. Solve the following system of equations by using:
a) Cramer’s Rule
b) Gaussian elimination

2 x1 + 1x2 − 3 x3 = 11
4 x1 − 2 x2 + 3 x3 = 8
− 2 x1 + 2 x2 − 1x3 = −6

CHAPTER 2: REVIEW OF MATRIX ALGEBRA


ANY QUESTION?

CHAPTER 2: REVIEW OF MATRIX ALGEBRA

You might also like