Lesson 3 - Matrices Part 1
Lesson 3 - Matrices Part 1
Lesson 3 - Matrices Part 1
PART 1
Engr. Irish May G. Saludar ☺
Matrix
• An array of numbers or functions arrange in m rows by n columns.
• Each entry in a matrix is called matrix elements.
𝑎11 𝑎12 𝑎13
𝐴= 𝑎
21 𝑎22 𝑎23
• 𝑎11 , 𝑎12 , 𝑎13 , 𝑎21 , 𝑎22 , and 𝑎23 are the elements of matrix A.
• Dimension/Size of a Matrix
• Given by ‘m’ rows by ‘n’ column (m x n)
• Transpose of a Matrix A
1 0
𝐴T = −2 5
2 7
Addition and Subtraction of Matrices
• Matrices can only be added or subtracted if they have the same size.
• Simply add/subtract element by element of the matrices.
EXAMPLE:
Solve for A + B if
2 0 −2 4
A= and B =
−1 3 7 10
2 0 −2 4 2 + (−2) 0+4
A+B= + =
−1 3 7 10 −1 + 7 3 + 10
0 4
A+B=
6 13
Multiplication of a Matrix with a Scalar
• When a matrix is multiplied with a scalar, each element of the matrix is
multiplied with the scalar
EXAMPLE:
Solve for 2A if
2 0
A=
−1 3
2×2 2×0
2A =
2 × −1 2 × 3
4 0
2A =
−2 6
Multiplication of Matrices
• Two matrices A(m x n) and B(p x q) can be multiplied if and only if n = p. The resulting
matrix will have a size of m x q. Note: Please observe the required size and resulting matrix
EXAMPLE:
Solve for A × B if
2 0 1 −2 4
A= and B =
−1 3 5 7 −4
𝑎11 = the sum of the products of the elements of row 1 of matrix A and column 1 of matrix B
𝑎12 = the sum of the products of the elements of row 1 of matrix A and column 2 of matrix B
𝑎21 = the sum of the products of the elements of row 2 of matrix A and column 1 of matrix B
𝑎23 = the sum of the products of the elements of row 2 of matrix A and column 3 of matrix B
2 0 1 −2 4
A×B= × how 𝑎11 is solved how 𝑎23 is solved
−1 3 5 7 −4
2∙1 + 0∙5 2 ∙ −2 + 0 ∙ 7 2 ∙ 4 + 0 ∙ −4
A×B=
−1 ∙ 1 + 3 ∙ 5 −1 ∙ −2 + 3 ∙ 7 −1 ∙ 4 + 3 ∙ −4
2 −4 8
A×B=
14 23 −16
Try to solve!
Calculate XZ T − Y if
0 −5
3 2 1 −2 2
X= Y= Z= 3 4
−4 5 0 5 7
−1 8
Answer:
−11 19 11
XZ T − Y =
−25 3 37
Determinant of a Matrix
A scalar quantity resulting from operation of square matrix.
• For a 2 × 2 matrix
𝑎11 𝑎12
D= 𝑎 𝑎22 = 𝑎11 𝑎22 − 𝑎21 𝑎12
21
to be easily understood:
𝑎11 𝑎12
D= 𝑎 𝑎22 = product of − product of
21
EXAMPLE:
1 2
Find the determinant of
−2 3
D = 1 ∙ 3 − −2 ∙ 2 = 7
Determinant of a Matrix
A scalar quantity resulting from operation of square matrix.
• For a 3 × 3 matrix
𝑎11 𝑎12 𝑎13
D = 𝑎21 𝑎22 𝑎23
𝑎31 𝑎32 𝑎33
= 𝑎11 𝑎22 𝑎33 + 𝑎12 𝑎23 𝑎31 + 𝑎13 𝑎21 𝑎32 − 𝑎31 𝑎22 𝑎13 + 𝑎32 𝑎23 𝑎11 + 𝑎33 𝑎21 𝑎12
to be easily understood: copy the first two columns, then use basket method.
𝑎11 𝑎12 𝑎13 𝑎11 𝑎12 𝑎11 𝑎12 𝑎13 𝑎11 𝑎12 𝑎13
D = 𝑎21 𝑎22 𝑎23 𝑎21 𝑎22 = 𝑎21 𝑎22 𝑎23 𝑎21 𝑎22 𝑎23
𝑎31 𝑎32 𝑎33 𝑎31 𝑎32 𝑎31 𝑎32 𝑎33 𝑎31 𝑎32 𝑎33
Example
4 2 0
Find the determinant of −1 1 3
8 −5 2
4 2 0 4 2
D = −1 1 3 −1 1
8 −5 2 8 −5
D = 4 ∙ 1 ∙ 2 + 2 ∙ 3 ∙ 8 + 0 ∙ −1 ∙ −5 − ( 8 ∙ 1 ∙ 0 + −5 ∙ 3 ∙ 4 + 2 ∙ −1 ∙ 2 )
D = 120