Matrix– Rectangular array of numbers; represented as M x N (rows and columns); Also, called dimension of matrix.
Aij represents i, j entry in the ith. row and jth. column in the matrix.
Vector– An N x 1 matrix; special matrix.Also called N dimensional vector; can be 0-indexed or 1-indexed.
Matrix Addition/Subtraction
Only matrix with same dimension can be added (M x N can be added to another M x N matrix). The result would be M x N matrix with corresponding element’s value as Aij + Bij
Scalar Multiplication/Division
We can multiply a scalar number to a matrix. In this case, result matrix’s each element would be a product of corresponding element * scalar value. Same holds true for division.
We can do a combination of scalar multiplication/division and/or matrix addition/subtraction.
Matrix - Matrix Multiplication
Now, matrix – vector multiplication is a type (subset) of matrix – matrix multiplication. The concept or operation is same.
Linear equation represented in a matrix form
In the example above, there is only one variable i.e. House Size represented by x. Note the first column of first matrix and representation of 2nd matrix. The multiplication would result in each equation on the top right of the image. Matrix is one way of representing these equations.
Matrix Multiplication Properties
1. Matrix multiplication is not cumulative.
If A (M x N) and B (N x M) are two matrices, A x B != B x A
This is obvious because A x B would be a M x M whereas B x A would be N x N.
2. Matrix multiplication is associative.
A x (B x C) = (A x B) x C
Identity Matrix
Special type of matrix ( N x N); Number of Rows is equal to number of columns; 1 is called identity number because multiplying it with any real number returns the same number. So
A x I = I x A = A
So identity matrix multiplication is cumulative (exception).
Inverse
If A is an M x M matrix (square matrix) and if it has an inverse then
A x A-1 = A-1 x A-1 = I (Identity)
Matrices that don’t have an inverse are called Singular or Degenerate matrix.