OFFICIAL (CLOSED) \ NON-SENSITIVE
Lesson 06
Matrices (1)
E114 – Engineering Mathematics
OFFICIAL (CLOSED) \ NON-SENSITIVE
Learning Outcomes for W06 and W07
• Explain a system of linear • Describe geometric
equations with real numbers, transformations such as
in matrix form, up to order translation and rotation
four. on two-dimensional
matrices.
• Perform basic operations
such as addition, subtraction
and multiplication, and • Apply geometric
elementary row operations transformations using
on matrices. translation and/or
rotation matrices on two-
dimensional matrices.
• Solve two unknown
variables using the concept
of inverse matrices.
2
OFFICIAL (CLOSED) \ NON-SENSITIVE
Recap: Kahoot!
Go to kahoot.it and enter the game pin shown
by your lecturer.
3
OFFICIAL (CLOSED) \ NON-SENSITIVE
Sharing Time
Based on your prior knowledge, write two sentences that relate to
the lesson.
Remember
to write your
Share this in the Padlet created by your lecturer.
name in the
post
This Photo by Unknown Author is licensed under
CC BY-NC 4
OFFICIAL (CLOSED) \ NON-SENSITIVE
Electrical Circuit
A group of RP students are working
together on an engineering project
involving robots.
Robots consist of mechanical and
electrical components with complex
electrical circuitry and circuit
diagrams.
This Photo by Unknown Author is licensed under CC BY-SA 5
OFFICIAL (CLOSED) \ NON-SENSITIVE
airs
Discuss in p
Electrical Circuit and share y
our
answers!
A simplified electrical circuit is shown below:
I1 is the current in loop 1,
I2 is the current in loop 2.
The relationship between Voltage (V) and Current (I) is :
V = IR (Ohm’s Law) where R = Resistance.
Using Loop Current Analysis, the following equations with the two
unknowns, I1 and I2 are obtained:
How would you solve such
equations? What if there are
more than 5 unknowns?
This Photo by Unknown Author is licensed under CC BY-SA 6
OFFICIAL (CLOSED) \ NON-SENSITIVE
What is a Matrix ?
• A Matrix is a rectangular array. of numbers, symbols or
expressions, arranged in rows and columns. The numbers,
symbols or expressions are called the elements, or entries, of the
( )
matrix. 2
𝑒 𝜋
(2)
( )
0 1
0 1 (1 −3
1
2
5 ) 2 √3
0 −4
• The order of a matrix is given by , where m is the number of
rows, and n is number of columns in the matrix.
( )
2
𝑒 𝜋
(2)
( )
0 1
0 1
(1 −3
1
2
5 ) 2 √3
Order: 1 x 1 Order: 1 x 4
0 −4
Order: 2 x 2 Order = ??
• 2 rows and 2 columns. Answer: 3 x 2
• Do not multiply the two
numbers together. 7
OFFICIAL (CLOSED) \ NON-SENSITIVE
Matrix Addition & Subtraction
• For matrix addition or subtraction of two matrices A and B, they
must be of the same order:
A B
mn mn
• The resulting matrix from the addition or subtraction of A and B
also has the same order as A and B.
• The resulting matrix is found by adding or subtracting the
corresponding entries in the matrices.
8
OFFICIAL (CLOSED) \ NON-SENSITIVE
Matrix Addition & Subtraction
[Example 1] Given matrix A = and matrix B =
Evaluate the following matrices:
[Solution]
1) 2B 2B = =
2) A + B A + B= ( − 1+3
2 −1
3+ 0
4 +3 ) (
0 +1
1 −2
=
2
1
3
7
1
−1 )
3) 0.5A – B
¿
( −3 .5
2
1.5
−1
−1
2 .5 ) 9
OFFICIAL (CLOSED) \ NON-SENSITIVE
Matrix Multiplication
• For matrix multiplication of two matrices A (order ) and B
(order :
AB
mn pq
• The multiplication is only valid when n = p . Otherwise, the
product of the two matrices is undefined.
• If the matrix multiplication is valid, Order of the product
matrix AB = m × q.
• Watch the video to learn how to do matrix multiplication
https://www.youtube.com/watch?v=IKFlUVIDOWQ
10
OFFICIAL (CLOSED) \ NON-SENSITIVE
Matrix Multiplication
[Example 2]
( 2 −1
Given that A = − 3 1 and B = ) () 4 , evaluate AB and BA.
5
[Solution] Recall: 𝐀𝐁
For a matrices 𝑚 ×𝑛 p
AB is defined and has order 2 x 1. The multiplication is only
valid when n = p.
AB=
( ) ()
2 −1
−3 1 2 ×2
4
5 2× 1
¿
(( −3)( 4)+(1)(5))
2 ( 4 )+(− 1)(5)
2× 1
Recall:
If the matrix multiplication
is valid,
¿
(−7 )
3
The product matrix BA is undefined.
Order of the product matrix
AB = m×q
11
OFFICIAL (CLOSED) \ NON-SENSITIVE
y–
Class Activit
Click the card! Share your
answers
1 5
A=
𝐀 +1𝐁=? CD5= ?
7 3
B=
𝟐 𝐂 −7
𝟑 𝐃=? 3 =?
BA
6 8
The order of the
6
matrix is B is …
C= DC8= ?
2 4
D= 𝟐 𝐂 −2𝐃=? 𝐂 +𝟑4𝐃 =?
12
OFFICIAL (CLOSED) \ NON-SENSITIVE
Questions?
13
OFFICIAL (CLOSED) \ NON-SENSITIVE
Come back at 10.15am
14
OFFICIAL (CLOSED) \ NON-SENSITIVE
Express a System of Linear Equations in Matrix Form
• A system of m linear equations in n variables can be compactly
represented using a matrix.
[Example 3]
𝑥 − 2𝑦 + 3 𝑧 = 9
Consider the following system of 3 linear equations in 3 variables:
3`𝑦 − 𝑥
2𝑥 − 5𝑦 + 5𝑧 =17
= −4
First, check that the order of appearance of the variables in
each linear equation is the same. If not, rearrange the terms in
the linear equation:
𝑥 − 2𝑦 + 3𝑧 = 9 A system of linear equations
−`𝑥 + 3𝑦 + 0𝑧 = −4 with the variables sorted.
2𝑥 − 5𝑦 + 5𝑧 = 17
Next, express the system of linear equations in the matrix form:
( )( ) ( )
1 −2 3 𝑥 9
−1 3 0 𝑦 = −4 Equivalent matrix form for the
2 −5 5 𝑧 17 system of linear equations
15
OFFICIAL (CLOSED) \ NON-SENSITIVE
Test Yourself 1:
Representing Data Using Matrices
A store sells red, yellow and blue shirts in three sizes: small, medium
and large.
The unit selling price (regardless of colour) is $x for a small-sized
shirt, $y for a medium-sized shirt, and $z for a large-sized shirt.
The table shows the number of shirts sold in a day.
Colour of Quantity of Quantity of Quantity of
Shirt Small Sizes Medium Large Sizes
Sold Sizes Sold Sold
Red 2 0 3
Yellow 4 5 7
Blue 3 5 1
The total income from the sale of the red shirts was $26, yellow
shirts $98, and blue shirts $58.
Represent the given data in the matrix form.
16
OFFICIAL (CLOSED) \ NON-SENSITIVE
Test Yourself 1:
Representing Data Using Matrices
Discussain pairs
our
and shwreersy!
ans
17
OFFICIAL (CLOSED) \ NON-SENSITIVE
Determinant of a 2 × 2 Matrix
a b
The determinant of a 2 × 2 matrix A = is denoted by
A and is calculated as: c d
det A = a × d – b × c
[Example 4] Checkpoint
Find the determinant of Find the determinant of
the matrix A = . . the matrix B = . .
det A = (−1)(4) − (5)
(−2)
= − 4 + 10
=6
18
OFFICIAL (CLOSED) \ NON-SENSITIVE
Inverse of a 2 × 2 Matrix
a b
In general, the inverse of a 2 × 2 matrix A =
c d is denoted by
and is calculated as:
( )
−1 1 𝑑 −𝑏 • Swap a and d terms.
𝐀 = • Negate b and c terms.
det 𝐀 −𝑐 𝑎
Note:
- A matrix that does not have an inverse is called a “singular matrix”.
- For a singular matrix, its determinant = 0.
- A matrix that has an inverse is called a “non-singular matrix”.
[Example 5] Find the inverse of the matrix A = .
det A = (−1)(4) − (5)(−2)
= − 4 + 10
=6
1
𝐀 − 1= 4 −5(
6 2 −1 ) 19
OFFICIAL (CLOSED) \ NON-SENSITIVE
Discuss in
Test Yourself 2: team and
share your
answers!
Find the inverse of the following 2 × 2 matrix:
3 1
M =
5 2
20
OFFICIAL (CLOSED) \ NON-SENSITIVE
Identity Matrix
• The identity matrix In is a square matrix, in other words an n × n
matrix, with entries “1” along the diagonal from upper left to
lower right and “0” in all other positions.
Col 1 Col 2 Col n
1 0 ... 0 Row 1
1 0 0
1 0 0 1 ... 0
I33 0 1 0
Row 2
IΙ11 1 II22 II nn
0 1 0 0 1 ...
0 0 ... 1 Row n
Order: 1 x 1 Order: 2 x 2 Order: 3 x 3 Order: n x n
21
OFFICIAL (CLOSED) \ NON-SENSITIVE
Identity Matrix
• We can only find the inverse of a non-singular square matrix .
• Multiplying any square matrix Mn x n = M with its inverse matrix
M-1 will return the identity matrix In = I :
MM-1 = I Post-multiply M by M-1
M-1M = I Pre-multiply M by M-1
• In general, any square matrix Mn x n = M multiplied with the
identity matrix In = I gives the original matrix.
MI = M
IM = M
22
OFFICIAL (CLOSED) \ NON-SENSITIVE
Solving 2 × 2 Matrix Equations
Using Inverse Matrix
• The inverse matrix can be used to solve matrix equations.
Starting Equation: M is a 2x2 matrix.
MX = Y X is a 2x1 matrix.
Pre-multiply M-1 on both sides: M-1MX = M- Y is a 2x1 matrix.
I = I2
1
Y
[Example 6]
5 1 x IX 6=
M Y
-1
Given that , find the values of x and y.
2 3 y 8 -1
M X XY= M Y
1 3 1
M
-1
13 2 5
x 6 1 3 1 6 1 3(6) 1(8) 1 26 2
M-1
y 8 13 2 5 8 13 2(6) 5(8) 13 52 4
x = 2, y = 4
23
OFFICIAL (CLOSED) \ NON-SENSITIVE
Think-Pair-Share 1: Discuss in
team and
Solving 2 × 2 Matrix Equations share your
answers!
3 1 x 2
Solve for x and y in . MX = Y
5 2 y 15
X = M-1Y
24
OFFICIAL (CLOSED) \ NON-SENSITIVE
Sharing Time
Share any 3 concepts which you have learnt so far.
Feel free to post any question.
Share this in the Padlet created by your lecturer.
25
OFFICIAL (CLOSED) \ NON-SENSITIVE
Practice Questions
Provide handwritten solutions for Q1 to Q9 in
the PQ document.
2 students will be randomly selected to share solutions
for 2 of the questions before the break
26
OFFICIAL (CLOSED) \ NON-SENSITIVE
Study Period
Time
Complete assigned tasks
and come back at 1.30pm
27
OFFICIAL (CLOSED) \ NON-SENSITIVE
Explanation of how to solve 3 × 3 Matrix Equations
• Elementary Row Operations (EROs) can be applied on the matrices to
arrive at a matrix equation that allows the variables to be solved.
2 3 1 x 17
0 0 4 y 12
4 7 4 z 44
⁞ A series of Elementary Row Operations
2 3 1 x 17 (EROs): Operator applied on both sides
H 0 0 4 y
H 12 of the equation
4 7 4 z 44
⁞ 2x + 3y + 1z = 17
So x = [17 – 3(4) – 1(3)] / 2 = 1
2 3 1 x 17 1y + 2z = 10
0 1 2 y 10 So y = 10 – 2(3) = 4
0 0 4 z 12 4z = 12
So z = 3
• To have the zero entries at the bottom left hand side of the matrix, so
that the variables z, y and x can be found in that order.
28
OFFICIAL (CLOSED) \ NON-SENSITIVE
Elementary Row Operations (EROs)
• A matrix can be reduced or simplified using three elementary row
operations. These operations are:
i. Interchange two rows,
ii. Multiply a row by a non-zero constant number, and
iii. Add a multiple of one row to another row
[Example 7]
Interchange the first and third rows.
Original Matrix New Matrix Notation Meaning of
Notation
0 1 3 2 1 1 2 2
R1 R3 Row 1 is swapped
0 0 1 4 0 0 1 4 with Row 3
1 1 2 2 0 1 3 2 ("↔" means “swap”)
29
OFFICIAL (CLOSED) \ NON-SENSITIVE
Elementary Row Operations (EROs)
[Example 8] Multiply the second row by –2 to produce a new second row.
Original Matrix New Matrix Notation Meaning of
Notation
0 1 3 2
0 1 3
2
( 2) R2 R2 (-2) times Row 2 and
0 0 1 4 x (-2) 0 0 2 8 then substitute the new
1 1 2 2 1 1 2 2 entries into Row 2 ("→”
means “substitute into”)
[Example 9] Add –2 times the first row to the third row to produce a
new third row.
Original Matrix New Matrix Notation
0 1 3 2
x (-2) (0 − 2− 6 − 4) 0 1
3 2
𝑅 3 +(− 2)𝑅 1 → 𝑅
0 0 1 4 0 0 1 4
+
1 1 2 2
(1 1− 2 2) 1 1 8 2
--------------------------- Meaning of Notation
Row 3 is added to (-2) times Row
1. The new entries are substituted
back into Row 3.
30
OFFICIAL (CLOSED) \ NON-SENSITIVE
Match the Pairs Team Activit
y
Matrix A undergoes a single elementary row operation to become matrix B.
For each Question (Q1, Q2 and Q3) match the corresponding Option.
Q1 Option 1:
( ) ( )
3 2 −1 3 2 −1 ERO: Interchange Row 1
𝐀= 0 2 1 𝐁= 0 −6 −3 with Row 3.
1 −1 1 1 −1 1
Notation:
Q2 Option 2:
( ) ( )
2 −1 1 2 −1 1 ERO: Multiply Row 2 by (–3)
𝐁= 5 to produce a new Row 2.
𝐀= 5 0 0 0 0
−1 3 2 1 2 3 Notation:
Q3 Option 3:
( ) ( )
1 −1 1 −4 3 2 ERO: Add Row 1 to Row 3
𝐴= − 1 0 3 𝐁= − 1 0 3 to produce a new Row 3.
−4 3 2 1 −1 1 Notation:
31
OFFICIAL (CLOSED) \ NON-SENSITIVE
Practice Questions
Provide handwritten solutions for Q10 to Q12 in
the PQ document.
2 students will be randomly selected to share solutions
for 2 of the questions before the break
32
OFFICIAL (CLOSED) \ NON-SENSITIVE
Presentation of Solutions for PQ
Each team will present your assigned PQs with
clear steps and explanation.
33
OFFICIAL (CLOSED) \ NON-SENSITIVE
Activity (25 min)
Work on the following:
1. Clear your
understanding for
the concepts and
Practice Questions
2. Scenario
3. SCORM
4. Exercise
34
OFFICIAL (CLOSED) \ NON-SENSITIVE
Quiz Deliverables
This quiz is to check your own understanding and it is not
gradable. Some tips on how you can assess your own
understanding effectively:
You should avoid using the internet or any software downloaded
from the internet to help you with the quiz.
You should avoid asking others for help to answer the questions
in the quiz.
You should avoid referring to laptop resources.
You are allowed to refer to handwritten and printed notes.
However, you are not allowed to refer to textbooks.
35
OFFICIAL (CLOSED) \ NON-SENSITIVE
E114 Deliverables
Non-milestone: Applicable to L01, 2, 4, 5, 6, 8, 10, 11 and 12
Present Absent without LOA* Absent with LOA*
Quiz Submit in LEO by 2359
Submit in LEO by 2359 on D on End of LOA period +
Non-milestone PQ
1
Lesson day
→D Padlet Submit Padlet Submit Padlet posts Submit in Padlet by 2359
posts on D by 2359 on D on End of LOA period +
1
PQ (for all lessons): Write answers on paper+scan/Type and submit them into the
“PQ Submission” folder in LEO. Have a hardcopy to refer for Milestone Quiz
* Students absent with/without LOA need to inform their lecturer directly
36