MAT1013 Lecture02 Matrices
MAT1013 Lecture02 Matrices
columns
𝑎11 ⋯ 𝑎1𝑛
rows ⋮ ⋱ ⋮
𝑎𝑚1 ⋯ 𝑎𝑚𝑛
where i = 1, 2, 3, …, m and j = 1, 2, 3, …, n.
𝑎11, 𝑎12, …, 𝑎𝑖𝑗 are called elements or entries of the matrix.
MATRICES IN COMPUTING
Video game development – matrices are used to perform transformations such as scaling, rotation or 2D and 3D
objects
Digital audio processing - filtering or compressing digital audio signals which are represented using a sequence of
numbers with matrix multiplication
Matrices are also used to represent graphs, which are in turn being used in network diagrams
Cryptography – encryption and decryption algorithms make use of matrices
Machine learning – matrices are used to represent data
SPECIAL MATRICES
0 ⋯ 0
O= ⋮ ⋱ ⋮
0 ⋯ 0
A matrix with ones on its diagonal and zeroes elsewhere is known as an identity matrix.
1 ⋯ 0
I= ⋮ ⋱ ⋮
0 ⋯ 1
MATRIX OPERATIONS: ADDITION AND SUBTRACTION
𝑎11 ⋯ 𝑎1𝑛
Let 𝐴 = ⋮ ⋱ ⋮ and k is a scalar.
𝑎𝑚1 ⋯ 𝑎𝑚𝑛
𝑘𝑎11 ⋯ 𝑘𝑎1𝑛
𝑘𝐴 = ⋮ ⋱ ⋮
𝑘𝑎𝑚1 ⋯ 𝑘𝑎𝑚𝑛
EXAMPLE 1
1 −2 3 3 0 2
Let 𝐴 = and 𝐵 = .
3 5 6 7 −2 4
What is the size of matrices A and B?
Determine A + B.
Find 2A – 3B.
BASIC PROPERTIES
A+O=A
A + (-A) = O
A+B=B+A
k(A + B) = kA + kB
(k1k2)A = k1(k2A)
𝑏1 𝑛
𝑎1 … 𝑎𝑛 ⋮ = 𝑎1𝑏1 + 𝑎2𝑏2 + ⋯ + 𝑎𝑛 𝑏𝑛 = 𝑎𝑖 𝑏𝑖
𝑏𝑛 𝑖=1
EXAMPLE 2
1 3 1 1
2 5 0 2
1 3 2 0 −4
2 −1 3 −2 6
2 0 −4 1 3
3 −2 6 2 −1
TRANSPOSE OF A MATRIX
The transpose of a matrix A, written AT, is the matrix obtained by interchanging the rows of A with its columns
𝑎11 ⋯ 𝑎1𝑛
𝐴= ⋮ ⋱ ⋮
𝑎𝑚1 ⋯ 𝑎𝑚𝑛
𝑎11 ⋯ 𝑎𝑚1
𝐴𝑇 = ⋮ ⋱ ⋮
𝑎1𝑛 ⋯ 𝑎𝑚𝑛
EXAMPLE 3
2
𝐴= 9
−15
−1 3 3
𝐶=
7 −5 −6
INVERSE OF A MATRIX
A matrix is said to be invertible if there exists a matrix B such that AB = BA = I, where I is the identity matrix.
𝑎 𝑏 1 𝑑 −𝑏
For a 2 x 2 matrix 𝐴 = , 𝐴−1 = 𝑎𝑑−𝑏𝑐 .
𝑐 𝑑 −𝑐 𝑎
EXAMPLE 4
2 4
𝐴=
1 7
5 3
𝑋=
0 2
APPLICATION OF INVERSE MATRICES: SYSTEM OF LINEAR
EQUATIONS
𝑎𝑥 + 𝑏𝑦 = 𝑚
c𝑥 + 𝑑𝑦 = 𝑛
Identity
Represent the linear matrix
Multiply both sides
equations in matrix form
with A-1
𝑎 𝑏 𝑥 𝑚 1 𝑑 −𝑐 𝑎 𝑏 𝑥 1 𝑑 −𝑐 𝑚
= =
𝑐 𝑑 𝑦 𝑛 𝑎𝑑 − 𝑏𝑐 −𝑏 𝑎 𝑐 𝑑 𝑦 𝑎𝑑 − 𝑏𝑐 −𝑏 𝑎 𝑛
A-1 A X A-1 B
A X B
𝑥 1 𝑑 −𝑐 𝑚
𝑦 =
𝑎𝑑 − 𝑏𝑐 −𝑏 𝑎 𝑛
EXAMPLE 5
3𝑥 − 𝑦 = 9
5𝑥 − 2𝑦 = 13
3 −1 𝑥 9 𝑥 5
= =
5 −2 𝑦 13 𝑦 6
A X B
x=5, y=6
𝑥 2 −1 9
𝑦 =
5 −3 13
X A-1 B
EXAMPLE 6
2𝑥 − 5𝑦 = −15
𝑥 + 3𝑦 = −2
2 −5 𝑥 −15 𝑥 −5
= =
1 3 𝑦 −2 𝑦 1
A X B
x=-5, y=1
𝑥 −15
𝑦 = −2
X A-1 B