Introduction to Matrices (lecture)
A matrix is an array of numbers, called elements, which are set in
rows and columns.
• The order/dimensions of a matrix is (rows x columns)
o Row matrix: a matrix consisting of a single row.
o Column matrix: a matrix consisting of a single column.
o Square matrix: a matrix with, rows = columns
o Zero matrix (null matrix): a matrix with all 0’s.
Matrix Addition
• Only matrices of the same order can be added
o Addition is associative: π΄ + (π΅ + πΆ ) = (π΄ + π΅) + πΆ
o Addition is commutative: π΄ + π΅ = π΅ + π΄
Scalar Multiplication
A scalar is a number that has magnitude but no direction.
• In scalar multiplication, the scalar is multiplied with all the
elements of the matrix.
• π΄ = 2π΅ βΊ
1
2
π΄=π΅
• If A and B have the same order, then for any scalar h and k:
o β(π΄ + π΅) = βπ΄ + βπ΅
o (β + π)π΄ = βπ΄ + ππ΄
o β(ππ΄) = (βπ)π΄
Sherry
Q1. Given π΄ = (
1 −2
4 0
) , π΅=(
) , calculate,
2 3
2 −1
a. π΄ + 3π΅
b. π΅ − 4π΄
Matrix Multiplication
• If matrix A is multiplied to matrix B to give AB, then,
o the dimensions of A and B should be of the form
(π × π) × (π × π) ,
Number of columns of A = Number of rows of B.
o The product matrix will be of the order (π × π).
• The product π΄π΅ means, π΄ is post-multiplied by π΅ or that π΅ is
pre-multiplied by π΄.
• Matrix multiplication,
o Is generally, NOT commutative: π΄π΅ ≠ π΅π΄.
o Is Associative: (π΄π΅)πΆ ≡ π΄(π΅πΆ).
o Is Distributive over addition: (π΄ + π΅)πΆ ≡ π΄πΆ + π΅πΆ.
1 −2
2
4 0
) , π΅=(
) , πΆ=(
2 3
0.5
2 −1
−1 4 1
π·=( 1
0 2)
−3 −2 3
Q2. Given π΄ = (
−1 1
),
3 0
If possible, calculate
a. π΄π΅
b. πΆπ·
c. π·2
Sherry
Identity Matrix
• The identity matrix (unit matrix), I, is a square matrix in
which the elements in the main diagonal (leading diagonal)
are all 1’s and all the other elements are 0’s.
• The main diagonal of a square matrix is the diagonal from
the top left element to the bottom right.
• Any matrix pre- or post-multiplied by I does not change:
π΄πΌ = πΌπ΄ = π΄
WORKSHEET 1
Determinant of a Matrix
• A scalar value associated with a square matrix that implies
certain characteristics of a linear transformation described
by the matrix is called a determinant.
• A singular matrix is the one with determinant = 0.
1. Det of a 2 x 2 Matrix
π
If π = (
π
π
) , then
π
π π
πππ‘(π) = |π| = |
| = ππ − ππ.
π π
2 −5
Q2. Find the determinant of the matrix (
).
6 7
π−3
−2
Q3. Let π = (
), where π is a constant. Find the set of
2
π+2
possible values of π for which π is singular.
Sherry
2. Det of a 3 x 3 Matrix
π
If π = (π
π
π
π
β
π
π ) , then
π
π
det(π) = π |
β
π
π
|−π|
π
π
π
π
|+π|
π
π
π
|
β
π π
• π΄=|
| is called the minor of the element π,
β π
π π
π΅=|
| is the minor of the element π and
π π
π
πΆ=|
π
π
| is the minor of the element π.
β
2
Q4. Find the determinant of the matrix (0
1
4 5
1 2).
−1 3
• The determinant of a square matrix has the following
properties:
o If two rows (or two columns) are identical, then
det(π) = 0 .
o If two rows (or two columns) are interchanged, then
only the sign of πππ‘(π) is changed.
o A multiple of one row (or column) added to another
row (or column), does not change the determinant.
o If A, B are square matrices, then
πππ‘(π΄π΅) = πππ‘(π΄) × πππ‘(π΅) .
o If M is an π × π matrix, then πππ‘(ππ) = π π πππ‘(π) .
Sherry
Elementary Row Operations
• Elementary row operations in Gaussian Elimination (Row
Reduction) method:
o Interchange any two rows.
o Multiply any row by a non-zero scalar.
o Add to any row, element by element, a scalar multiple of
the corresponding elements of another row.
• A matrix is said to be in row echelon form if the pivot
elements of each row have all zeros on their left and below.
• The determinant is the product of the elements of the
π
leading diagonal in row echelon form, (
0
π
π
) , (0
π
0
π
π
0
π
π ),
π
divided by the row multiples on the changing rows.
Q5.
Calculate the determinants of the following,
1
a. (1
2
4
b. (2
1
3
c. (0
1
1 0
3 1)
1 4
1 −1
4
0)
−1 5
−1 −3
4
1)
−1 2
WORKSHEET 2
Matrix Inverse
• Only non-singular matrices (determinant ≠ 0) have an inverse.
Sherry
1. Inverse of a 2 x 2 matrix
π
If π = (
π
π
),
π
then π−1 =
1
π
(
det (π) −π
−π
) , ππππ£ππππ det (π) ≠ 0
π
• ππ−1 = π−1 π = πΌ
Q6. Given that B and C are non-singular matrices and π΄π΅πΆ = πΌ, show that
π΄ = πΆ −1 π΅−1 .
Q7. Find the matrix M, given that ππ = (
1 1
3 −1
) and π = (
)
−1 1
−2 1
2. Inverse of a 3 x 3 matrix
• Use row reduction method on (π΄|πΌ) to make (πΌ|π΄−1 ).
Q8. Using row operations, find the inverse matrix of,
4
a. (2
3
0
b. (1
1
1 −1
0
1)
−2 4
0 1
2 0)
3 1
• (π΄π΅)−1 = π΅−1 π΄−1 .
1 0
Q9. Given that π΄ = (0 1
1 1
1
−1
)
π΅
=
(
and
1
1
0
0
1 0
0 1 ), determine the
0 −1
result of πΆ, where π΄π΅πΆ = πΌ.
WORKSHEET 3
PAST PAPERS
Sherry