------------------------ MATRICES CHEAT SHEET ------------------------
---------------------- 1. Introduction to Matrices ----------------------
Definition:
A matrix is a rectangular array of numbers arranged in rows and columns.
Example of a matrix:
A = [a_11 a_12 a_13]
[a_21 a_22 a_23]
[a_31 a_32 a_33]
---------------------------------------------------------------
------------------ 2. Types of Matrices ------------------------
1. **Row Matrix**: A matrix with only one row.
Example: A = [a_11 a_12 a_13]
2. **Column Matrix**: A matrix with only one column.
Example: B = [a_11]
[a_21]
[a_31]
3. **Square Matrix**: A matrix with the same number of rows and columns.
Example: C = [a_11 a_12]
[a_21 a_22]
4. **Zero Matrix**: A matrix where all elements are zero.
Example: D = [0 0 0]
[0 0 0]
5. **Diagonal Matrix**: A square matrix where all off-diagonal elements are zero.
Example: E = [a_11 0 0]
[0 a_22 0]
[0 0 a_33]
6. **Identity Matrix**: A diagonal matrix where all diagonal elements are 1.
Example: F = [1 0 0]
[0 1 0]
[0 0 1]
---------------------------------------------------------------
------------------ 3. Matrix Operations -----------------------
1. **Addition of Matrices**:
- Matrices can only be added if they have the same dimensions.
Example:
A = [1 2]
[3 4]
B = [5 6]
[7 8]
A + B = [6 8]
[10 12]
2. **Subtraction of Matrices**:
- Matrices can only be subtracted if they have the same dimensions.
Example:
A = [3 4]
[5 6]
B = [1 2]
[3 4]
A - B = [2 2]
[2 2]
3. **Scalar Multiplication**:
- Multiply every element of the matrix by a scalar (a constant).
Example:
2 * A = 2 * [1 2]
[3 4]
= [2 4]
[6 8]
4. **Multiplication of Matrices**:
- Matrix multiplication is only possible if the number of columns in the first
matrix equals the number of rows in the second matrix.
Example:
A = [1 2] B = [5 6]
[3 4] [7 8]
A * B = [1*5 + 2*7 1*6 + 2*8]
[3*5 + 4*7 3*6 + 4*8]
= [19 22]
[43 50]
5. **Transpose of a Matrix**:
- The transpose of a matrix is obtained by swapping rows and columns.
Example:
A = [1 2 3]
[4 5 6]
A^T = [1 4]
[2 5]
[3 6]
---------------------------------------------------------------
------------------ 4. Special Types of Matrices ------------------
1. **Symmetric Matrix**:
- A square matrix that is equal to its transpose.
Example:
A = [1 2 3]
[2 4 5]
[3 5 6]
A^T = [1 2 3]
[2 4 5]
[3 5 6]
Since A = A^T, A is symmetric.
2. **Skew-Symmetric Matrix**:
- A square matrix where the transpose is equal to the negative of the matrix.
Example:
B = [0 2 -1]
[-2 0 3]
[1 -3 0]
B^T = [0 -2 1]
[2 0 -3]
[-1 3 0]
Since B^T = -B, B is skew-symmetric.
---------------------------------------------------------------
------------------ 5. Determinant of a Matrix -----------------
1. **Determinant of a 2x2 Matrix**:
- The determinant of a 2x2 matrix A = [a b] is calculated as:
[c d]
det(A) = ad - bc
Example:
A = [1 2]
[3 4]
det(A) = (1*4) - (2*3) = 4 - 6 = -2
2. **Determinant of a 3x3 Matrix**:
- The determinant of a 3x3 matrix is calculated using cofactor expansion.
Example:
A = [a b c]
[d e f]
[g h i]
det(A) = a(ei - fh) - b(di - fg) + c(dh - eg)
---------------------------------------------------------------
------------------ 6. Minors, Cofactors, and Adjoint -----------------
1. **Minor of a Matrix**:
- The minor of an element is the determinant of the matrix obtained by deleting
the row and column containing that element.
2. **Cofactor of a Matrix**:
- The cofactor is the minor with a sign depending on its position (positive or
negative).
3. **Adjoint (Adjugate) of a Matrix**:
- The adjoint of a matrix is the transpose of the cofactor matrix.
---------------------------------------------------------------
------------------ 7. Inverse of a Matrix ----------------------
1. **Inverse of a Matrix**:
- A matrix A has an inverse denoted by A^(-1) if and only if det(A) ≠ 0.
- A * A^(-1) = I (the identity matrix).
2. **Inverse of a 2x2 Matrix**:
If A = [a b]
[c d]
Then A^(-1) = (1/det(A)) * [d -b]
[-c a]
---------------------------------------------------------------
------------------ 8. Systems of Linear Equations ----------------
1. **Solving Linear Equations Using Matrices**:
- A system of linear equations can be represented as AX = B, where A is the
coefficient matrix, X is the variable matrix, and B is the constant matrix.
- The solution is X = A^(-1) * B (if A^(-1) exists).
---------------------------------------------------------------