You are on page 1of 59

Steven Broom

CHEN10072
Engineering Mathematics 2
What will we study?

• Matrices. Week 1 (Lectures 1-2)


• Systems of equations. Weeks 2-3 (Lectures 3-6)


• Analytic ordinary differential equations. Week 4 (Lectures 7-8)


• Laplace Transforms. Weeks 5-6 (Lectures 9-12)


• Numerical ordinary differential equations. Weeks 7-8 (Lectures 13-16)


Books

[1]  Stroud KA and Booth DJ.

Engineering Mathematics. 5th edition. Palgrave, 2001. 


[2]  Chapra SC and Canale RP.

Numerical methods for engineering. 7th edition. McGraw-Hill, 2006. 


[3]  Quarteroni A, Saleria F and Gervasio P.

Scientific Computing with MATLAB and Octave. 4th edition. Springer, 2010. 


[4]  HELM: Helping Engineers Learn Mathematics

http://www.maths.manchester.ac.uk/study/ undergraduate/

information-for-current-students/service-teaching/resources/ 

CHEN10072 Engineering Mathematics 2

Week 1: Matrices

1 2 3 5 p q 1 −1 0
[3] [ t u] [1 3 −2]
A= 4 5 6 B= 4 C = [−2 0 3] D= r s E= 0 2 2
7 8 9
Matrices
1 2 3 5 p q 1 −1 0
[3] [ t u] [1 3 −2]
A= 4 5 6 B= 4 C = [−2 0 3] D= r s E= 0 2 2
7 8 9

Multiply by scalar:
Matrices
1 2 3 5 p q 1 −1 0
[3] [ t u] [1 3 −2]
A= 4 5 6 B= 4 C = [−2 0 3] D= r s E= 0 2 2
7 8 9

Multiply by scalar:

15
3B = 12
9
Matrices
1 2 3 5 p q 1 −1 0
[3] [ t u] [1 3 −2]
A= 4 5 6 B= 4 C = [−2 0 3] D= r s E= 0 2 2
7 8 9

Multiply by scalar:

15 5k
3B = 12 kB = 4k
9 3k
Matrices
1 2 3 5 p q 1 −1 0
[3] [ t u] [1 3 −2]
A= 4 5 6 B= 4 C = [−2 0 3] D= r s E= 0 2 2
7 8 9

Multiply by scalar:

15 5k
3B = 12 kB = 4k
9 3k

Add Matrices:
Matrices
1 2 3 5 p q 1 −1 0
[3] [ t u] [1 3 −2]
A= 4 5 6 B= 4 C = [−2 0 3] D= r s E= 0 2 2
7 8 9

Multiply by scalar:

15 5k
3B = 12 kB = 4k
9 3k

Add Matrices:

2 1 3
[8 11 7]
A+E= 4 7 8
Matrices
1 2 3 5 p q 1 −1 0
[3] [ t u] [1 3 −2]
A= 4 5 6 B= 4 C = [−2 0 3] D= r s E= 0 2 2
7 8 9

Multiply by scalar:

15 5k
3B = 12 kB = 4k
9 3k

Add Matrices:

2 1 3
[8 11 7]
A+E= 4 7 8 A+DX
Matrices
1 2 3 5 p q 1 −1 0
[3] [ t u] [1 3 −2]
A= 4 5 6 B= 4 C = [−2 0 3] D= r s E= 0 2 2
7 8 9

Multiply by scalar:

15 5k
3B = 12 kB = 4k
9 3k

Add Matrices:

2 1 3
[8 11 7]
A+E= 4 7 8 A+DX E+BX
Matrices
1 2 3 5 p q 1 −1 0
[3] [ t u] [1 3 −2]
A= 4 5 6 B= 4 C = [−2 0 3] D= r s E= 0 2 2
7 8 9

Multiply by scalar:

15 5k
3B = 12 kB = 4k
9 3k

Add Matrices:

2 1 3
[8 11 7]
A+E= 4 7 8 A+DX E+BX

Must be the same shape


Matrices
1 2 3 5 p q 1 −1 0
[3] [ t u] [1 3 −2]
A= 4 5 6 B= 4 C = [−2 0 3] D= r s E= 0 2 2
7 8 9

Multiply matrices:
To calculate PxQ, the number of columns in P must equal
the number of rows in Q.

e.g. AxB √ BxA X CxD √ DxE X

ED ?
DC ?
EB ?
BA ?

Usually PQ ≠ QP
Matrices
>> A=[1 2 ; 3 4 ]
A =
MATLAB 1 2
3 4

>> B=[5 6]
B =
5 6

>> A*B
Error using *
Inner matrix dimensions must agree.

>> B*A
ans =
23 34
Matrices
Multiply matrices:

[3 4]
1 2
Example 1 [5 6] ×
Matrices
Multiply matrices:

[3 4]
1 2
Example 1 [5 6] ×
Matrices
Multiply matrices:

[3 4]
1 2
Example 1 [5 6] ×

= [5 × 1 + 6 × 3 − ]
Matrices
Multiply matrices:

[3 4]
1 2
Example 1 [5 6] ×

= [5 × 1 + 6 × 3 − ]
Matrices
Multiply matrices:

[3 4]
1 2
Example 1 [5 6] ×

= [5 × 1 + 6 × 3 − ]
Matrices
Multiply matrices:

[3 4]
1 2
Example 1 [5 6] ×

= [5 × 1 + 6 × 3 − ]

= [5 × 1 + 6 × 3 5 × 2 + 6 × 4]
Matrices
Multiply matrices:

[3 4]
1 2
Example 1 [5 6] ×

= [5 × 1 + 6 × 3 − ]

= [5 × 1 + 6 × 3 5 × 2 + 6 × 4]
Matrices
Multiply matrices:

[3 4]
1 2
Example 1 [5 6] ×

= [5 × 1 + 6 × 3 − ]

= [5 × 1 + 6 × 3 5 × 2 + 6 × 4]

= [23 34]
Matrices
Multiply matrices:

[−2 1] [−1 4]
0 3 1 9
Example 2 ×
Matrices
Multiply matrices:
1 7
[−2 1 0] [ ]
1 2 3
Example 3 × −1 4
0 3
Matrices
Identity Matrix:

[0 1]
1 0
I=

1 0 0
[0 0 1]
I= 0 1 0

1 0 0 0
0 1 0 0
I=
0 0 1 0
0 0 0 1
Matrices
Determinant:

A=[
r s]
p q

det(A) = p × s − r × q = ps − rq

The Determinant has a number of uses which we will cover shortly.


Matrices
Determinant:

[3 10]
2 1
B=

[3 5 ]
1 −8
C=
Matrices
Determinant:

[3 10]
2 1
B=

det(B) = 2 × 10 − 3 × 1 = 17

[3 5 ]
1 −8
C=
Matrices
Determinant:

[3 10]
2 1
B=

det(B) = 2 × 10 − 3 × 1 = 17

[3 5 ]
1 −8
C=

det(C) = 1 × 5 − 3 × −8 = 29
Matrices
Inverse of a 2X2 Matrix:

A=[
r s]
p q

The inverse of A is written A-1


Matrices
Inverse of a 2X2 Matrix:

A=[
r s]
p q

The inverse of A is written A-1

1 s −q
[ ]
−1
A = −r p
det(A)
Matrices
Inverse of a 2X2 Matrix:

A=[
r s]
p q

The inverse of A is written A-1

1 s −q
[ ]
−1
A = −r p
det(A)

1 s −q
ps − rq [−r p ]
−1
A =
Matrices
Inverse of a 2X2 Matrix:

[3 10]
2 1
B=
Matrices
Inverse of a 2X2 Matrix:

[3 10]
2 1
B=

det(B) = 2 × 10 − 3 × 1 = 17
Matrices
Inverse of a 2X2 Matrix:

[3 10]
2 1
B=

det(B) = 2 × 10 − 3 × 1 = 17

17 [−3 2 ]
−1 1 10 −1
B =
Matrices
Inverse of a 2X2 Matrix:

[3 10]
2 1
B=

det(B) = 2 × 10 − 3 × 1 = 17

17 [−3 2 ]
−1 1 10 −1
B =

−1
B×B =
Matrices
Inverse of a 2X2 Matrix:

[3 5 ]
1 −8
C=
Matrices
Inverse of a 2X2 Matrix:

[3 5 ]
1 −8
C=

det(C) = 1 × 5 − 3 × −8 = 29
Matrices
Inverse of a 2X2 Matrix:

[3 5 ]
1 −8
C=

det(C) = 1 × 5 − 3 × −8 = 29

29 [−3 1]
−1 1 5 8
C =
Matrices
Inverse of a 2X2 Matrix:

[3 5 ]
1 −8
C=

det(C) = 1 × 5 − 3 × −8 = 29

29 [−3 1]
−1 1 5 8
C =

−1
C×C =
Matrices
Determinant of a 3X3 Matrix:

p q r
[v w x]
A= s t u

det(A) = p(tx − wu) − q(sx − vu) + r(sw − vt)


Matrices
Determinant of a 3X3 Matrix:

+ - +
p q r
[v w x]
A= s t u

det(A) = p(tx − wu) − q(sx − vu) + r(sw − vt)


Matrices
Determinant of a 3X3 Matrix:

1 2 3
A= 4 5 6
1 2 0
Matrices
Determinant of a 3X3 Matrix:

1 2 3
A= 4 5 6
1 2 0

det(A) = (1)(0 − 12) − 2(0 − 6) + 3(8 − 5)


Matrices
Determinant of a 3X3 Matrix:

1 2 3
A= 4 5 6
1 2 0

det(A) = (1)(0 − 12) − 2(0 − 6) + 3(8 − 5)

det(A) = − 12 + 12 + 9
Matrices
Determinant of a 3X3 Matrix:

1 2 3
A= 4 5 6
1 2 0

det(A) = (1)(0 − 12) − 2(0 − 6) + 3(8 − 5)

det(A) = − 12 + 12 + 9

det(A) = 9
Matrices
‘Minors’:

1 2 3
A= 4 5 6
1 2 0

−12 −6 3
−6 −3 0
−3 −6 −3
Matrices
‘Minors’:

1 2 3
A= 4 5 6
1 2 0

−12 −6 3
−6 −3 0
−3 −6 −3
Matrices
‘Minors’:

1 2 3 5 6
= − 12
A= 4 5 6 2 0
1 2 0

−12 −6 3
−6 −3 0
−3 −6 −3
Matrices
‘Minors’:

1 2 3 5 6
= − 12
A= 4 5 6 2 0
1 2 0

1 2 3 4 6
=−6
A= 4 5 6 1 0
1 2 0

−12 −6 3
−6 −3 0
−3 −6 −3
Matrices
‘Minors’:

1 2 3 5 6
= − 12
A= 4 5 6 2 0
1 2 0

1 2 3 4 6
=−6
A= 4 5 6 1 0
1 2 0

1 2 −12 −6 3
1 2 3 =0
A= 4 5 6 1 2 −6 −3 0
−3 −6 −3
1 2 0
Matrices
Matrix of cofactors:

−12 −6 3
−6 −3 0
−3 −6 −3
Matrices
Matrix of cofactors:

−12 −6 3
−6 −3 0
−3 −6 −3 + − +
[+ − + ]
− + −
Matrices
Matrix of cofactors:

−12 −6 3 −12 6 −3
−6 −3 0 M= 6 −3 0
−3 −6 −3 + − + −3 6 −3
[+ − + ]
− + −
Matrices
Matrix of cofactors:

−12 −6 3 −12 6 −3
−6 −3 0 M= 6 −3 0
−3 −6 −3 + − + −3 6 −3
[+ − + ]
− + −

−12 6 −3
Transpose M: MT = 6 −3 6
−3 0 −3
Matrices
Inverse (finally!):

1 −12 6 −3
−1
Inverse: A = 6 −3 6
9
−3 0 −3

1 −4 2 −1
3[ ]
= 2 −1 2
−1 0 −1
Matrices
Inverse (finally!):
−12 6 −3
T
Transpose M: M = 6 −3 6
−3 0 −3

1 −12 6 −3
−1
Inverse: A = 6 −3 6
9
−3 0 −3

1 −4 2 −1
3[ ]
= 2 −1 2
−1 0 −1
Matrices
Simultaneous equations

3x + 2y - z = 10
x - 2y + 3z = 14
6x + 4y - 2z = 8

3 2 −1 x 10
[ ] [ ]
1 −2 3 × y = 14
6 4 −2 z 8
Matrices
Simultaneous equations

3x + 2y - z = 10
x - 2y + 3z = 14
6x + 4y - 2z = 8

3 2 −1 x 10
[ ] [ ]
1 −2 3 × y = 14
6 4 −2 z 8

det(A) = (3)(4 − 12) − 2(−2 − 18) + (−1)(4 + 12) = 0

You might also like