https://slides.com/georgelee/ics141-matrices/live
<Insert Keanu Reeves photo here>
A rectangular array of values where every element belongs to a set S. A matrix has m rows and n columns. The element aij belongs to row i and column j.
The size of a matrix is m x n. If m = n, we say the matrix is a square matrix.
The transpose of a matrix A, denoted by At, is the n x m matrix obtained by interchanging the rows and columns.
In other words, if B = At, then aij = bji
[1 2 t = [1 3
3 4] 2 4]
Provided that two matrices are the same size, we can add or subtract matrices by adding or subtracting their elements.
[ 1 2 + [2 4 = [3 6 3 4 ] 6 8] 9 12]
[1 2 3] + [3 4 5] = [4 6 8]
Two matrices A and B can be multiplied if the number of columns in the A is the same as the number of rows in the B. Note that matrix multiplication is NOT commutative.
Given two matrices mA x nA and mB x nB, we can multiply them only if nA = mB. The size of the product is mA x nB.
[1 2 x [2 4 = [? ? 3 4] 6 8] ? ?]
[1 2 x [2 4 = [(1*2 + 2*6) ? 3 4] 6 8] ? ?]
[1 2 x [2 4 = [14 (1*4 + 2*8) 3 4] 6 8] ? ?]
[1 2 x [2 4 = [? ? 3 4] 6 8] ? ?]
[1 2 x [2 4 = [14 20 3 4] 6 8] (3*2 + 4*6) ?]
[1 2 x [2 4 = [14 20 3 4] 6 8] 30 (3*4 + 4*8)]
The identity matrix of order n is an n x n matrix In = [𝛿ij] where 𝛿ij = 1 if i = j and is 0 otherwise.
[1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1]
The inverse of an n x n matrix A is the the matrix A-1 such that AA-1 = I (the identity matrix).
A matrix A is symmetric if it is equal to its transpose. That is, A = At. For example, the identity matrix is symmetric.
[1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1]
A matrix where all the values are either 0 or 1. We can define logic-like operators on it.
The join of zero-one matrices A and B is aij v bij for each element in A and B.
The meet of zero-one matrices A and B is aij ^ bij for each element in A and B.
Similar to matrix multiplication, we can find a boolean product of two matrices. Instead of multiplication, we have ^, and instead of addition we have v.
That is, if we're multiplying two matrices of size m x k and k x n:
cij = (ai,1 ^ b1,j) v (ai,2 ^ b2,j) v ... v (ai,k ^ bk,j)