DescribingTheWorldIn3D - Matrices Lecture Notes
DescribingTheWorldIn3D - Matrices Lecture Notes
What is a Matrix?
A matrix is a rectangular array of numbers or variables with 𝑚 rows and 𝑛 columns. For example, a
matrix of order 3 × 2 looks like this:
𝑎11 𝑎12
𝑎
𝐴 = [ 21 𝑎22 ]
𝑎31 𝑎32
When we talk about an individual element in a matrix we denote it by a subscript 𝑎𝑖𝑗 where 𝑖 is its
row and 𝑗 is its column.
Determinant of a Matrix
Example:
−2 3
𝐴=[ ]
1 4
|𝐴| = (−2 × 4 − 1 × 3) = −11
Determinant of a 3x3 matrix
𝑎11 𝑎12 𝑎13
𝐴 = [𝑎21 𝑎22 𝑎23 ]
𝑎31 𝑎32 𝑎33
|𝐴| = 𝑎11 (𝑎22 𝑎33 − 𝑎32 𝑎23 ) − 𝑎12 (𝑎21 𝑎33 − 𝑎31 𝑎23 ) + 𝑎13 (𝑎21 𝑎32 − 𝑎31 𝑎22 )
Example:
5 2 3
𝐵 = [ 4 5 6]
7 8 9
The multiplication goes as follows, element 𝐶𝑖𝑗 of the resultant matrix is the dot product of a row 𝑖
of A with column 𝑗 of B
1×1+2×3+3×5 1×2+2×4+3×6 22 28
𝐵𝐴 = [ ]=[ ]
4×1+5×3+6×5 4×2+5×4+6×6 49 64
Another way of thinking about it is each element can be defined as the sum of the multiplication of
elements from matrix 𝐴 and 𝐵.
𝑛
Instead of dividing square matrices we instead multiply by their inverse. We can find the inverse of a
square matrix using the following formula, as long as the determinant is not equal to 0. To do this
we have to find the determinant of A and find the transpose of the cofactors of A.
1 𝑇
𝐴−1 = 𝐶
|𝐴|
First we have to generate the matrix of cofactors, 𝐶, The cofactor of an element in a matrix is equal
to its corresponding sign from the sign matrix times the minor of that element, where the minor is
the determinant of the matrix comprised of all other elements that do not share a row or column
with the element.
+|𝑎22 | −|𝑎21 | 4 −1
𝐶=[ ]=[ ]
−|𝑎12 | +|𝑎11 | −3 −2
4 −3
𝐶𝑇 = [ ]
−1 −2
1 4 −3 −0.3636 0.2727
𝐴−1 = − [ ]=[ ]
11 −1 −2 0.0909 0.1818
7 1 9 1 9 7
+| | −| | +| |
4 1 3 1 3 4
7 6 5 6 5 7
𝐶 = −| | +| | −| |
4 1 3 1 3 4
7 6 5 6 5 7
[+ |7 1
| −|
9 1
| +|
9 7]
|
3 −6 15
𝐶 = [ 17 −13 1 ]
−35 49 −28