Linear Algebra Matrices

Concept

Linear Algebra - Matrices

Matrices

Definition

An m×nm \times n matrix is array of numbers with mm rows and nn columns:

a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix}$$ ### Matrix Operations **Addition:** $(A + B)_{ij} = a_{ij} + b_{ij}$ (same size) **Scalar Multiplication:** $(cA)_{ij} = ca_{ij}$ **Matrix Multiplication:** For $A$ ($m \times n$) and $B$ ($n \times p$): $$(AB)_{ij} = \sum_{k=1}^n a_{ik}b_{kj}$$ **Properties:** - $A(BC) = (AB)C$ (associative) - $A(B + C) = AB + AC$ (distributive) - $(A + B)C = AC + BC$ (distributive) - **NOT commutative:** $AB \neq BA$ in general **Transpose:** $(A^T)_{ij} = a_{ji}$ **Properties of Transpose:** - $(A^T)^T = A$ - $(A + B)^T = A^T + B^T$ - $(AB)^T = B^T A^T$ ### Square Matrices **Diagonal matrix:** Nonzero entries only on main diagonal. **Upper triangular:** Nonzero entries on/above diagonal. **Lower triangular:** Nonzero entries on/below diagonal. **Identity matrix I:** Diagonal entries 1, others 0. $AI = IA = A$. **Zero matrix:** All entries 0. ### Determinant **2×2:** $$\det(A) = \begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc$$ **3×3 (Sarrus Rule):** $$\det(A) = a(ei-fh) - b(di-fg) + c(dh-eg)$$ **Cofactor expansion:** $$\det(A) = \sum_{j=1}^n a_{ij}C_{ij}$$ where $C_{ij}$ is cofactor. **Properties:** - $\det(AB) = \det(A)\det(B)$ - $\det(A^T) = \det(A)$ - $\det(cA) = c^n \det(A)$ ($n \times n$ matrix) - If two rows swapped, det changes sign - If two rows identical, $\det = 0$ - If row is multiple of another, $\det = 0$ - Elementary row operations: det changes by constant ### Inverse Matrix $A^{-1}$ exists $\iff \det(A) \neq 0$. $A A^{-1} = A^{-1} A = I$ **Formula (2×2):** $$A^{-1} = \frac{1}{ad-bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}$$ **Formula (general, using adjugate):** $$A^{-1} = \frac{1}{\det(A)}\text{adj}(A)$$ **Properties:** - $(AB)^{-1} = B^{-1}A^{-1}$ - $(A^T)^{-1} = (A^{-1})^T$ - $\det(A^{-1}) = 1/\det(A)$ **Gauss-Jordan Elimination:** Find inverse by augmenting with identity and row reducing.