Skip to main content

Foundations of Linear Algebra

Vectors and Norms​

A vector x∈Rn\mathbf{x} \in \mathbb{R}^n represents a column tuple:

x=[x1x2⋮xn]\mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix}

Inner Product and Orthogonality​

The standard Euclidean inner product is defined as:

⟨x,y⟩=xTy=∑i=1nxiyi\langle \mathbf{x}, \mathbf{y} \rangle = \mathbf{x}^T \mathbf{y} = \sum_{i=1}^n x_i y_i

The Cauchy-Schwarz inequality bounds the inner product:

∣xTy∣≤∥x∥2∥y∥2|\mathbf{x}^T \mathbf{y}| \le \Vert \mathbf{x} \Vert_2 \Vert \mathbf{y} \Vert_2

with equality if and only if x\mathbf{x} and y\mathbf{y} are linearly dependent. Two vectors are orthogonal (x⊥y\mathbf{x} \perp \mathbf{y}) when xTy=0\mathbf{x}^T \mathbf{y} = 0.

Vector Norms​

For x∈Rn\mathbf{x} \in \mathbb{R}^n, the standard pp-norms are:

  • L1L_1 Norm: ∥x∥1=∑i=1n∣xi∣\Vert \mathbf{x} \Vert_1 = \sum_{i=1}^n |x_i|
  • L2L_2 Norm: ∥x∥2=xTx=∑i=1nxi2\Vert \mathbf{x} \Vert_2 = \sqrt{\mathbf{x}^T \mathbf{x}} = \sqrt{\sum_{i=1}^n x_i^2}
  • L∞L_\infty Norm: ∥x∥∞=max⁡1≤i≤n∣xi∣\Vert \mathbf{x} \Vert_\infty = \max_{1 \le i \le n} |x_i|

Matrix Properties and Subspaces​

For A∈Rm×n\mathbf{A} \in \mathbb{R}^{m \times n}, the matrix defines a linear transformation T:Rn→RmT: \mathbb{R}^n \to \mathbb{R}^m via x↦Ax\mathbf{x} \mapsto \mathbf{A}\mathbf{x}.

Fundamental Subspaces​

  1. Range / Column Space: R(A)={Ax∣x∈Rn}⊆Rm\mathcal{R}(\mathbf{A}) = \{\mathbf{A}\mathbf{x} \mid \mathbf{x} \in \mathbb{R}^n\} \subseteq \mathbb{R}^m
  2. Kernel / Null Space: N(A)={x∈Rn∣Ax=0}⊆Rn\mathcal{N}(\mathbf{A}) = \{\mathbf{x} \in \mathbb{R}^n \mid \mathbf{A}\mathbf{x} = \mathbf{0}\} \subseteq \mathbb{R}^n
  3. Row Space: R(AT)⊆Rn\mathcal{R}(\mathbf{A}^T) \subseteq \mathbb{R}^n
  4. Left Null Space: N(AT)⊆Rm\mathcal{N}(\mathbf{A}^T) \subseteq \mathbb{R}^m

The subspaces form orthogonal complements under the fundamental theorem of linear algebra:

R(A)⊥=N(AT),R(AT)⊥=N(A)\mathcal{R}(\mathbf{A})^\perp = \mathcal{N}(\mathbf{A}^T), \quad \mathcal{R}(\mathbf{A}^T)^\perp = \mathcal{N}(\mathbf{A})

The dimensions satisfy the Rank-Nullity Theorem:

rank(A)+nullity(A)=n\text{rank}(\mathbf{A}) + \text{nullity}(\mathbf{A}) = n

Canonical Matrix Classes​

ClassDefinitionKey Properties
SymmetricA=AT\mathbf{A} = \mathbf{A}^TReal eigenvalues; admitting an orthonormal eigenbasis.
OrthogonalQ∈Rn×n,  QTQ=I\mathbf{Q} \in \mathbb{R}^{n \times n}, \; \mathbf{Q}^T \mathbf{Q} = \mathbf{I}Isometry: ∥Qx∥2=∥x∥2\Vert \mathbf{Q}\mathbf{x} \Vert_2 = \Vert \mathbf{x} \Vert_2; condition number κ(Q)=1\kappa(\mathbf{Q}) = 1.
Symmetric Positive Definite (SPD)A=AT,  xTAx>0  ∀x≠0\mathbf{A} = \mathbf{A}^T, \; \mathbf{x}^T \mathbf{A} \mathbf{x} \gt 0 \; \forall \mathbf{x} \neq \mathbf{0}Strictly positive real eigenvalues (λi>0\lambda_i \gt 0); admits unique Cholesky factorization.
Unitary (Complex)U∈Cn×n,  U∗U=I\mathbf{U} \in \mathbb{C}^{n \times n}, \; \mathbf{U}^* \mathbf{U} = \mathbf{I}Preserves inner products in Cn\mathbb{C}^n.

Matrix Norms and Conditioning​

Norms​

  • Frobenius Norm:
    ∥A∥F=∑i=1m∑j=1naij2=tr(ATA)\Vert \mathbf{A} \Vert_F = \sqrt{\sum_{i=1}^m \sum_{j=1}^n a_{ij}^2} = \sqrt{\text{tr}(\mathbf{A}^T \mathbf{A})}
  • Induced 2-Norm (Spectral Norm):
    ∥A∥2=sup⁡x≠0∥Ax∥2∥x∥2=σmax⁡(A)\Vert \mathbf{A} \Vert_2 = \sup_{\mathbf{x} \neq \mathbf{0}} \frac{\Vert \mathbf{A}\mathbf{x} \Vert_2}{\Vert \mathbf{x} \Vert_2} = \sigma_{\max}(\mathbf{A})

Condition Number​

For invertible A∈Rn×n\mathbf{A} \in \mathbb{R}^{n \times n}, the 2-norm condition number is:

κ(A)=∥A∥2∥A−1∥2=σmax⁡(A)σmin⁡(A)\kappa(\mathbf{A}) = \Vert \mathbf{A} \Vert_2 \Vert \mathbf{A}^{-1} \Vert_2 = \frac{\sigma_{\max}(\mathbf{A})}{\sigma_{\min}(\mathbf{A})}

When solving Ax=b\mathbf{A}\mathbf{x} = \mathbf{b}, relative perturbations in data propagate according to:

∥δx∥∥x∥≤κ(A)(∥δA∥∥A∥+∥δb∥∥b∥)\frac{\Vert \delta \mathbf{x} \Vert}{\Vert \mathbf{x} \Vert} \le \kappa(\mathbf{A}) \left( \frac{\Vert \delta \mathbf{A} \Vert}{\Vert \mathbf{A} \Vert} + \frac{\Vert \delta \mathbf{b} \Vert}{\Vert \mathbf{b} \Vert} \right)

BLAS Operational Hierarchy​

Dense linear algebra software divides computational routines into three BLAS tiers based on operational intensity:

BLAS TierSignature ExampleFLOPsData MovementArithmetic Intensity (FLOPs/Byte\text{FLOPs/Byte})Performance Regime
Level 1y←αx+y\mathbf{y} \leftarrow \alpha \mathbf{x} + \mathbf{y} (AXPY)2n2n3n×sizeof(T)3n \times \text{sizeof}(T)≈2/(3×4)≈0.17\approx 2 / (3 \times 4) \approx 0.17Memory Bandwidth Bound
Level 2y←αAx+βy\mathbf{y} \leftarrow \alpha \mathbf{A}\mathbf{x} + \beta \mathbf{y} (GEMV)2n22n^2(n2+2n)×sizeof(T)(n^2 + 2n) \times \text{sizeof}(T)≈2/sizeof(T)≈0.5\approx 2 / \text{sizeof}(T) \approx 0.5Memory Bandwidth Bound
Level 3C←αAB+βC\mathbf{C} \leftarrow \alpha \mathbf{A}\mathbf{B} + \beta \mathbf{C} (GEMM)2mnk2mnk(mn+mk+nk)×sizeof(T)(mn + mk + nk) \times \text{sizeof}(T)O(n)O(n) with tilingCompute Bound

In Level 3 BLAS, data transferred from main memory (HBM/DRAM) into on-chip cache or registers can be reused O(n)O(n) times. This arithmetic reuse is what allows modern GPU matrix execution pipelines (AMD Matrix Core, NVIDIA Tensor Core) to run at sustained theoretical throughput.