Matrix Math Made Easy
1. What is a Matrix?
A matrix is a rectangular arrangement of numbers in rows and columns.
Example:
[1 2]
[3 4]
This is a 2x2 matrix.
2. Types of Matrices
a) Row Matrix: One row. Example: [2 5 7]
b) Column Matrix: One column. Example: [3; 6; 9]
c) Square Matrix: Same number of rows and columns. Example: [1 2; 3 4]
d) Zero Matrix: All elements are zero. Example: [0 0; 0 0]
e) Diagonal Matrix: Non-zero on diagonal, rest zero. Example: [5 0; 0 9]
f) Identity Matrix: Diagonal = 1, rest = 0. Example: [1 0; 0 1]
3. Matrix Addition & Subtraction
Add or subtract corresponding elements.
Example:
A = [1 2; 3 4], B = [5 6; 7 8]
A + B = [6 8; 10 12], A - B = [-4 -4; -4 -4]
4. Scalar Multiplication
Multiply each element by a number.
Example: 2 * [3 4; 5 6] = [6 8; 10 12]
5. Matrix Multiplication
Multiply rows of the first matrix with columns of the second.
Example:
Matrix Math Made Easy
A = [1 2; 3 4], B = [2 0; 1 2]
A * B = [4 4; 10 8]
6. Transpose of a Matrix
Flip the matrix: rows become columns.
Example:
A = [1 2; 3 4] -> A^T = [1 3; 2 4]
7. Determinant of a 2x2 Matrix
For A = [a b; c d], |A| = ad - bc
Example: [3 2; 1 4] -> 3*4 - 2*1 = 10
8. Inverse of a 2x2 Matrix
If A = [a b; c d], then A^(-1) = (1/(ad - bc)) * [d -b; -c a]
Example: A = [1 2; 3 4], then A^(-1) = [-2 1; 1.5 -0.5]
9. Solving Linear Equations using Matrices
System:
x + 2y = 5
3x + 4y = 6
Write as AX = B:
A = [1 2; 3 4], X = [x; y], B = [5; 6]
Then, X = A^(-1) * B