<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Linear-Algebra · QuickRef</title><link>https://qref.eknath.dev/tags/linear-algebra/</link><description>Linear-Algebra updates from QuickRef</description><language>en-us</language><atom:link href="https://qref.eknath.dev/tags/linear-algebra/index.xml" rel="self" type="application/rss+xml"/><lastBuildDate>Sun, 01 Jan 2023 00:00:00 +0000</lastBuildDate><item><title>Matrices</title><link>https://qref.eknath.dev/math/matrices/</link><guid isPermaLink="true">https://qref.eknath.dev/math/matrices/</guid><pubDate>Sun, 01 Jan 2023 00:00:00 +0000</pubDate><category>matrices</category><category>linear-algebra</category><category>eigenvalues</category><category>determinants</category><category>systems</category><category>transformations</category><category>applied-mathematics</category><description>Comprehensive guide to matrices covering foundations, operations, linear algebra, eigenvalues, and applications in applied mathematics.</description><content:encoded><![CDATA[<h2 id="prerequisites">Prerequisites</h2>
<p><strong>Required:</strong></p>
<ul>
<li><strong><a href="../algebra">Algebra</a></strong> - Systems of equations, basic function concepts</li>
<li><strong><a href="../basic-math">BasicMath</a></strong> - All arithmetic operations</li>
</ul>
<p><strong>Helpful:</strong></p>
<ul>
<li><strong><a href="../geometry">Geometry</a></strong> - For transformation applications</li>
<li><strong><a href="../statistics">Statistics</a></strong> - For data analysis applications</li>
</ul>
<h2 id="overview">Overview</h2>
<p>Matrices are rectangular arrays of numbers that serve as fundamental tools in mathematics, science, and engineering. They provide a compact way to represent and manipulate systems of linear equations, geometric transformations, data structures, and complex mathematical relationships.</p>
<p>This comprehensive guide covers matrix fundamentals through advanced applications, including linear algebra, eigenvalue problems, matrix decompositions, and real-world applications in computer graphics, data science, engineering, and scientific computing.</p>
<h2 id="matrix-fundamentals">Matrix Fundamentals</h2>
<h3 id="definition-and-notation">Definition and Notation</h3>
<p>A <strong>matrix</strong> is a rectangular array of numbers, symbols, or expressions arranged in rows and columns.</p>
<pre tabindex="0"><code>General matrix A with m rows and n columns (m×n matrix):

A = [a₁₁  a₁₂  a₁₃  ...  a₁ₙ]
    [a₂₁  a₂₂  a₂₃  ...  a₂ₙ]
    [a₃₁  a₃₂  a₃₃  ...  a₃ₙ]
    [ ⋮    ⋮    ⋮   ⋱    ⋮ ]
    [aₘ₁  aₘ₂  aₘ₃  ...  aₘₙ]

Notation:
• A = [aᵢⱼ] where i is row number, j is column number
• Element in row i, column j: aᵢⱼ
• Size: m×n (m rows, n columns)
• A₃ₓ₂ means 3 rows, 2 columns
</code></pre><h3 id="types-of-matrices">Types of Matrices</h3>
<h4 id="by-size">By Size</h4>
<pre tabindex="0"><code>Row Matrix (Row Vector): 1×n matrix
A = [a₁  a₂  a₃  ...  aₙ]

Column Matrix (Column Vector): m×1 matrix
B = [b₁]
    [b₂]
    [⋮]
    [bₘ]

Square Matrix: n×n matrix (equal rows and columns)
C = [c₁₁  c₁₂]
    [c₂₁  c₂₂]

Rectangular Matrix: m×n where m ≠ n
</code></pre><h4 id="special-square-matrices">Special Square Matrices</h4>
<pre tabindex="0"><code>Identity Matrix (I): Main diagonal is 1s, all other elements 0
I₃ = [1  0  0]
     [0  1  0]
     [0  0  1]

Zero Matrix (0): All elements are 0
0₂ₓ₃ = [0  0  0]
       [0  0  0]

Diagonal Matrix: Non-zero elements only on main diagonal
D = [d₁  0   0 ]
    [0   d₂  0 ]
    [0   0   d₃]

Upper Triangular: All elements below main diagonal are 0
U = [u₁₁  u₁₂  u₁₃]
    [0    u₂₂  u₂₃]
    [0    0    u₃₃]

Lower Triangular: All elements above main diagonal are 0
L = [ℓ₁₁  0    0  ]
    [ℓ₂₁  ℓ₂₂  0  ]
    [ℓ₃₁  ℓ₃₂  ℓ₃₃]
</code></pre><h4 id="symmetric-and-special-matrices">Symmetric and Special Matrices</h4>
<pre tabindex="0"><code>Symmetric Matrix: A = Aᵀ (equals its transpose)
S = [1  2  3]
    [2  5  4]
    [3  4  6]

Skew-Symmetric: A = -Aᵀ (diagonal elements are 0)
K = [ 0   2  -1]
    [-2   0   3]
    [ 1  -3   0]

Orthogonal Matrix: AAᵀ = AᵀA = I
• Columns (and rows) are orthonormal vectors
• |det(A)| = 1
</code></pre><h2 id="matrix-operations">Matrix Operations</h2>
<h3 id="matrix-equality">Matrix Equality</h3>
<p>Two matrices are equal if they have the same dimensions and corresponding elements are equal.</p>
<pre tabindex="0"><code>If A = [aᵢⱼ] and B = [bᵢⱼ], then A = B if and only if:
• A and B have same dimensions
• aᵢⱼ = bᵢⱼ for all i, j
</code></pre><h3 id="matrix-addition-and-subtraction">Matrix Addition and Subtraction</h3>
<pre tabindex="0"><code>Only matrices of the same size can be added or subtracted.
(A ± B)ᵢⱼ = aᵢⱼ ± bᵢⱼ

Example:
A = [1  2]    B = [5  6]
    [3  4]        [7  8]

A + B = [1+5  2+6] = [6   8]
        [3+7  4+8]   [10  12]

A - B = [1-5  2-6] = [-4  -4]
        [3-7  4-8]   [-4  -4]

Properties:
• Commutative: A + B = B + A
• Associative: (A + B) + C = A + (B + C)
• Zero matrix: A + 0 = A
• Additive inverse: A + (-A) = 0
</code></pre><h3 id="scalar-multiplication">Scalar Multiplication</h3>
<pre tabindex="0"><code>Multiply every element by the scalar k.
(kA)ᵢⱼ = k · aᵢⱼ

Example: k = 3, A = [1  2]
                    [3  4]

3A = [3·1  3·2] = [3   6]
     [3·3  3·4]   [9  12]

Properties:
• k(A + B) = kA + kB
• (k + m)A = kA + mA
• k(mA) = (km)A
• 1·A = A, 0·A = 0
</code></pre><h3 id="matrix-multiplication">Matrix Multiplication</h3>
<pre tabindex="0"><code>For A (m×p) and B (p×n), product AB is m×n.
Number of columns in A must equal number of rows in B.

(AB)ᵢⱼ = Σ(k=1 to p) aᵢₖbₖⱼ = aᵢ₁b₁ⱼ + aᵢ₂b₂ⱼ + ... + aᵢₚbₚⱼ

Example:
A = [1  2  3]    B = [7   8]
    [4  5  6]        [9  10]
                     [11 12]

AB = [1·7+2·9+3·11   1·8+2·10+3·12] = [58  64]
     [4·7+5·9+6·11   4·8+5·10+6·12]   [139 152]

Key Properties:
• NOT commutative: AB ≠ BA (in general)
• Associative: (AB)C = A(BC)
• Distributive: A(B + C) = AB + AC
• AI = IA = A (identity property)
</code></pre><h3 id="matrix-transpose">Matrix Transpose</h3>
<pre tabindex="0"><code>The transpose Aᵀ is formed by swapping rows and columns.
(Aᵀ)ᵢⱼ = aⱼᵢ

Example:
A = [1  2  3]    Aᵀ = [1  4]
    [4  5  6]          [2  5]
                       [3  6]

Properties:
• (Aᵀ)ᵀ = A
• (A + B)ᵀ = Aᵀ + Bᵀ
• (kA)ᵀ = kAᵀ
• (AB)ᵀ = BᵀAᵀ (note the order reversal!)
</code></pre><h2 id="determinants">Determinants</h2>
<h3 id="definition-and-computation">Definition and Computation</h3>
<p>The determinant is a scalar value that encodes important properties of a square matrix.</p>
<h4 id="22-determinant">2×2 Determinant</h4>
<pre tabindex="0"><code>For A = [a  b]
        [c  d]

det(A) = |A| = ad - bc

Example:
A = [3  2]
    [1  4]

det(A) = 3·4 - 2·1 = 12 - 2 = 10
</code></pre><h4 id="33-determinant-cofactor-expansion">3×3 Determinant (Cofactor Expansion)</h4>
<pre tabindex="0"><code>For A = [a₁₁  a₁₂  a₁₃]
        [a₂₁  a₂₂  a₂₃]
        [a₃₁  a₃₂  a₃₃]

Expand along first row:
det(A) = a₁₁(a₂₂a₃₃ - a₂₃a₃₂) - a₁₂(a₂₁a₃₃ - a₂₃a₃₁) + a₁₃(a₂₁a₃₂ - a₂₂a₃₁)

Example:
A = [2  1  3]
    [4  5  6]
    [7  8  9]

det(A) = 2(5·9 - 6·8) - 1(4·9 - 6·7) + 3(4·8 - 5·7)
       = 2(45 - 48) - 1(36 - 42) + 3(32 - 35)
       = 2(-3) - 1(-6) + 3(-3)
       = -6 + 6 - 9 = -9
</code></pre><h4 id="general-nn-determinant">General n×n Determinant</h4>
<pre tabindex="0"><code>For larger matrices, use cofactor expansion along any row or column:

det(A) = Σⱼ aᵢⱼ · Cᵢⱼ    (expansion along row i)
det(A) = Σᵢ aᵢⱼ · Cᵢⱼ    (expansion along column j)

where Cᵢⱼ = (-1)^(i+j) · Mᵢⱼ
Mᵢⱼ is the minor (determinant of submatrix after removing row i, column j)
</code></pre><h3 id="properties-of-determinants">Properties of Determinants</h3>
<pre tabindex="0"><code>1. det(I) = 1
2. det(AB) = det(A) · det(B)
3. det(Aᵀ) = det(A)
4. det(kA) = kⁿ det(A) for n×n matrix
5. If A has a row/column of zeros, det(A) = 0
6. Swapping two rows/columns changes sign: det(A) → -det(A)
7. If two rows/columns are identical, det(A) = 0
8. Adding multiple of one row to another doesn&#39;t change determinant

Geometric Interpretation:
• For 2×2: Area of parallelogram formed by column vectors
• For 3×3: Volume of parallelepiped formed by column vectors
• Sign indicates orientation (positive = right-handed)
</code></pre><h2 id="matrix-inverse">Matrix Inverse</h2>
<h3 id="definition">Definition</h3>
<p>For square matrix A, the inverse A⁻¹ satisfies:
AA⁻¹ = A⁻¹A = I</p>
<p>A matrix is <strong>invertible</strong> (nonsingular) if det(A) ≠ 0.</p>
<h3 id="22-matrix-inverse">2×2 Matrix Inverse</h3>
<pre tabindex="0"><code>For A = [a  b], if det(A) = ad - bc ≠ 0:
        [c  d]

A⁻¹ = 1/(ad-bc) · [ d  -b]
                   [-c   a]

Example:
A = [3  2]
    [1  4]

det(A) = 12 - 2 = 10

A⁻¹ = 1/10 · [4  -2] = [0.4  -0.2]
             [-1   3]   [-0.1  0.3]

Verify: AA⁻¹ = [3  2][0.4  -0.2] = [1  0]
               [1  4][-0.1  0.3]   [0  1] ✓
</code></pre><h3 id="general-inverse-methods">General Inverse Methods</h3>
<h4 id="gauss-jordan-elimination">Gauss-Jordan Elimination</h4>
<pre tabindex="0"><code>To find A⁻¹, solve [A | I] → [I | A⁻¹] using row operations.

Example: Find inverse of A = [1  2]
                             [3  4]

[1  2 | 1  0]
[3  4 | 0  1]

R₂ = R₂ - 3R₁:
[1  2 | 1  0]
[0 -2 |-3  1]

R₂ = -½R₂:
[1  2 | 1   0]
[0  1 |3/2 -1/2]

R₁ = R₁ - 2R₂:
[1  0 |-2   1]
[0  1 |3/2 -1/2]

Therefore: A⁻¹ = [-2    1]
                 [3/2  -1/2]
</code></pre><h4 id="adjugate-method">Adjugate Method</h4>
<pre tabindex="0"><code>For n×n matrix A:
A⁻¹ = (1/det(A)) · adj(A)

where adj(A) is the adjugate matrix:
adj(A) = [Cᵢⱼ]ᵀ (transpose of cofactor matrix)
</code></pre><h3 id="properties-of-matrix-inverse">Properties of Matrix Inverse</h3>
<pre tabindex="0"><code>1. (A⁻¹)⁻¹ = A
2. (AB)⁻¹ = B⁻¹A⁻¹ (note the order reversal!)
3. (Aᵀ)⁻¹ = (A⁻¹)ᵀ
4. det(A⁻¹) = 1/det(A)
5. If A is invertible, so is Aᵀ
6. For diagonal matrix D, D⁻¹ has reciprocals on diagonal
</code></pre><h2 id="systems-of-linear-equations">Systems of Linear Equations</h2>
<h3 id="matrix-representation">Matrix Representation</h3>
<p>A system of linear equations can be written as Ax = b.</p>
<pre tabindex="0"><code>System:
2x + 3y = 7
4x + y = 5

Matrix form:
[2  3][x] = [7]
[4  1][y]   [5]

Where A = [2  3], x = [x], b = [7]
          [4  1]      [y]      [5]
</code></pre><h3 id="solution-methods">Solution Methods</h3>
<h4 id="cramers-rule-for-square-systems-with-deta--0">Cramer&rsquo;s Rule (for square systems with det(A) ≠ 0)</h4>
<pre tabindex="0"><code>For Ax = b where A is n×n and invertible:

xᵢ = det(Aᵢ)/det(A)

where Aᵢ is A with column i replaced by b.

Example: 2x + 3y = 7, 4x + y = 5
A = [2  3], det(A) = 2·1 - 3·4 = -10
    [4  1]

A₁ = [7  3], det(A₁) = 7·1 - 3·5 = -8
     [5  1]

A₂ = [2  7], det(A₂) = 2·5 - 7·4 = -18
     [4  5]

x = -8/(-10) = 4/5 = 0.8
y = -18/(-10) = 9/5 = 1.8
</code></pre><h4 id="matrix-inverse-method">Matrix Inverse Method</h4>
<pre tabindex="0"><code>If A is invertible: x = A⁻¹b

Using previous example:
A⁻¹ = -1/10 · [1  -3] = [-0.1   0.3]
              [-4   2]   [0.4  -0.2]

x = A⁻¹b = [-0.1   0.3][7] = [-0.7 + 1.5] = [0.8]
           [0.4  -0.2][5]   [2.8 - 1.0]   [1.8]
</code></pre><h4 id="gaussian-elimination">Gaussian Elimination</h4>
<pre tabindex="0"><code>Transform augmented matrix [A | b] to row echelon form.

Example: 
x + 2y + z = 6
2x + y + z = 5
x + y + 2z = 7

[1  2  1 | 6]
[2  1  1 | 5]
[1  1  2 | 7]

R₂ = R₂ - 2R₁, R₃ = R₃ - R₁:
[1  2  1 | 6]
[0 -3 -1 |-7]
[0 -1  1 | 1]

R₃ = R₃ - ⅓R₂:
[1  2  1 | 6]
[0 -3 -1 |-7]
[0  0  4/3| 10/3]

Back substitution:
z = (10/3)/(4/3) = 10/4 = 2.5
y = (-7 + 2.5)/(-3) = 1.5
x = 6 - 2(1.5) - 2.5 = 0.5
</code></pre><h3 id="types-of-solutions">Types of Solutions</h3>
<pre tabindex="0"><code>For system Ax = b:

1. Unique Solution: A is invertible (det(A) ≠ 0)
   • Exactly one solution x = A⁻¹b

2. No Solution: System is inconsistent
   • Usually when rank(A) ≠ rank([A|b])

3. Infinite Solutions: System is underdetermined
   • More unknowns than independent equations
   • Solution involves parameters

For homogeneous system Ax = 0:
• Always has trivial solution x = 0
• Non-trivial solutions exist ⟺ det(A) = 0
</code></pre><h2 id="eigenvalues-and-eigenvectors">Eigenvalues and Eigenvectors</h2>
<h3 id="definition-1">Definition</h3>
<p>For square matrix A, a non-zero vector v is an <strong>eigenvector</strong> with corresponding <strong>eigenvalue</strong> λ if:
Av = λv</p>
<p>This means the matrix transformation only scales the vector by factor λ.</p>
<h3 id="finding-eigenvalues">Finding Eigenvalues</h3>
<p>Solve the characteristic equation: det(A - λI) = 0</p>
<pre tabindex="0"><code>Example: A = [3  1]
             [0  2]

A - λI = [3-λ   1 ]
         [0   2-λ]

det(A - λI) = (3-λ)(2-λ) - 1·0 = (3-λ)(2-λ) = 0

Eigenvalues: λ₁ = 3, λ₂ = 2
</code></pre><h3 id="finding-eigenvectors">Finding Eigenvectors</h3>
<p>For each eigenvalue λ, solve (A - λI)v = 0.</p>
<pre tabindex="0"><code>For λ₁ = 3:
(A - 3I)v = [0  1][v₁] = [0]
            [0 -1][v₂]   [0]

This gives: v₂ = 0, v₁ is free
Eigenvector: v₁ = [1] (or any non-zero scalar multiple)
                  [0]

For λ₂ = 2:
(A - 2I)v = [1  1][v₁] = [0]
            [0  0][v₂]   [0]

This gives: v₁ + v₂ = 0, so v₂ = -v₁
Eigenvector: v₂ = [1 ] (or any non-zero scalar multiple)
                  [-1]
</code></pre><h3 id="properties-of-eigenvalues">Properties of Eigenvalues</h3>
<pre tabindex="0"><code>For n×n matrix A with eigenvalues λ₁, λ₂, ..., λₙ:

1. tr(A) = λ₁ + λ₂ + ... + λₙ (trace equals sum of eigenvalues)
2. det(A) = λ₁ · λ₂ · ... · λₙ (determinant equals product)
3. Eigenvalues of Aᵀ are the same as A
4. If A is invertible, eigenvalues of A⁻¹ are 1/λᵢ
5. Eigenvalues of kA are k times eigenvalues of A
6. For symmetric matrix, all eigenvalues are real

Geometric multiplicity ≤ Algebraic multiplicity
• Algebraic: multiplicity of λ as root of characteristic polynomial
• Geometric: dimension of eigenspace (null space of A - λI)
</code></pre><h3 id="diagonalization">Diagonalization</h3>
<p>Matrix A is <strong>diagonalizable</strong> if A = PDP⁻¹ where D is diagonal.</p>
<pre tabindex="0"><code>Process:
1. Find eigenvalues λ₁, λ₂, ..., λₙ
2. Find corresponding eigenvectors v₁, v₂, ..., vₙ
3. P = [v₁ v₂ ... vₙ] (eigenvectors as columns)
4. D = diag(λ₁, λ₂, ..., λₙ)

Requirements for diagonalizability:
• A must have n linearly independent eigenvectors
• Guaranteed if all eigenvalues are distinct
• Symmetric matrices are always diagonalizable

Benefits:
• Aᵏ = PDᵏP⁻¹ (easy to compute powers)
• Easy to analyze matrix behavior
• Simplifies differential equations
</code></pre><h2 id="advanced-matrix-topics">Advanced Matrix Topics</h2>
<h3 id="matrix-decompositions">Matrix Decompositions</h3>
<h4 id="lu-decomposition">LU Decomposition</h4>
<p>Every invertible matrix A can be written as A = LU where L is lower triangular and U is upper triangular.</p>
<pre tabindex="0"><code>Example: A = [2  1  1]
             [4  3  3]
             [8  7  9]

Using Gaussian elimination with row operations:
A = [1  0  0][2  1  1]
    [2  1  0][0  1  1]
    [4  3  1][0  0  2]
  = L     ·   U

Applications:
• Efficient solving of Ax = b for multiple b vectors
• Computing determinants: det(A) = det(L)det(U)
• Matrix inversion
</code></pre><h4 id="qr-decomposition">QR Decomposition</h4>
<p>Every matrix A can be written as A = QR where Q has orthonormal columns and R is upper triangular.</p>
<pre tabindex="0"><code>Process (Gram-Schmidt):
1. Start with columns of A: a₁, a₂, ..., aₙ
2. Create orthogonal vectors: u₁, u₂, ..., uₙ
3. Normalize to get orthonormal vectors: q₁, q₂, ..., qₙ
4. Q = [q₁ q₂ ... qₙ], R contains normalization factors

Applications:
• Solving least squares problems
• Eigenvalue computation (QR algorithm)
• Orthogonal transformations
</code></pre><h4 id="singular-value-decomposition-svd">Singular Value Decomposition (SVD)</h4>
<p>Every m×n matrix A can be written as A = UΣVᵀ where:
• U is m×m orthogonal matrix
• Σ is m×n diagonal matrix (singular values)
• V is n×n orthogonal matrix</p>
<pre tabindex="0"><code>Properties:
• Singular values σᵢ ≥ 0, ordered σ₁ ≥ σ₂ ≥ ... ≥ σᵣ &gt; 0
• Rank of A equals number of non-zero singular values
• ||A||₂ = σ₁ (largest singular value)

Applications:
• Principal Component Analysis (PCA)
• Data compression
• Pseudo-inverse computation
• Low-rank approximations
</code></pre><h3 id="special-matrix-classes">Special Matrix Classes</h3>
<h4 id="positive-definite-matrices">Positive Definite Matrices</h4>
<p>A symmetric matrix A is positive definite if xᵀAx &gt; 0 for all non-zero x.</p>
<pre tabindex="0"><code>Equivalent conditions:
1. All eigenvalues are positive
2. All leading principal minors are positive
3. A = BᵀB for some invertible B
4. Cholesky decomposition A = LLᵀ exists

Applications:
• Optimization (Hessian matrices)
• Stability analysis
• Covariance matrices
• Energy functions
</code></pre><h4 id="stochastic-matrices">Stochastic Matrices</h4>
<p>Matrix where all entries are non-negative and each row sums to 1.</p>
<pre tabindex="0"><code>Properties:
• 1 is always an eigenvalue
• All eigenvalues have |λ| ≤ 1
• Used in Markov chains

Example (transition matrix):
P = [0.7  0.3]
    [0.2  0.8]

Represents probabilities of state transitions
</code></pre><h4 id="orthogonal-matrices">Orthogonal Matrices</h4>
<p>Matrix Q where QᵀQ = QQᵀ = I.</p>
<pre tabindex="0"><code>Properties:
• Columns (and rows) form orthonormal set
• det(Q) = ±1
• Preserves distances: ||Qx|| = ||x||
• Q⁻¹ = Qᵀ

Examples:
• Rotation matrices
• Reflection matrices
• Householder matrices
</code></pre><h3 id="norms-and-condition-numbers">Norms and Condition Numbers</h3>
<h4 id="matrix-norms">Matrix Norms</h4>
<pre tabindex="0"><code>Frobenius norm: ||A||_F = √(Σᵢⱼ aᵢⱼ²)

2-norm (spectral norm): ||A||₂ = σ₁ (largest singular value)

1-norm: ||A||₁ = max_j Σᵢ |aᵢⱼ| (max column sum)

∞-norm: ||A||_∞ = max_i Σⱼ |aᵢⱼ| (max row sum)
</code></pre><h4 id="condition-number">Condition Number</h4>
<p>κ(A) = ||A|| · ||A⁻¹|| measures how sensitive solutions are to perturbations.</p>
<pre tabindex="0"><code>Properties:
• κ(A) ≥ 1 always
• κ(A) = ∞ if A is singular
• For 2-norm: κ₂(A) = σ₁/σₙ (ratio of largest to smallest singular value)

Interpretation:
• κ(A) ≈ 1: Well-conditioned (stable)
• κ(A) &gt;&gt; 1: Ill-conditioned (unstable)

Impact on solving Ax = b:
If input has relative error ε, output error is roughly κ(A) · ε
</code></pre><h2 id="matrix-applications">Matrix Applications</h2>
<h3 id="computer-graphics-and-transformations">Computer Graphics and Transformations</h3>
<h4 id="2d-transformations">2D Transformations</h4>
<pre tabindex="0"><code>Rotation by angle θ:
R(θ) = [cos θ  -sin θ]
       [sin θ   cos θ]

Scaling by factors sx, sy:
S = [sx  0 ]
    [0   sy]

Reflection across x-axis:
Rx = [1   0]
     [0  -1]

Translation by (tx, ty) using homogeneous coordinates:
T = [1  0  tx]
    [0  1  ty]
    [0  0  1 ]
</code></pre><h4 id="3d-transformations">3D Transformations</h4>
<pre tabindex="0"><code>Rotation about z-axis by θ:
Rz(θ) = [cos θ  -sin θ  0]
        [sin θ   cos θ  0]
        [0       0      1]

General rotation: combine Rx, Ry, Rz or use rotation matrix from axis-angle

Perspective projection:
P = [f/aspect  0    0           0    ]
    [0         f    0           0    ]
    [0         0    -(far+near) -2fn ]
    [0         0    -1          0    ]

where f = 1/tan(fov/2), n = near, far = far clipping planes
</code></pre><h3 id="data-science-and-statistics">Data Science and Statistics</h3>
<h4 id="principal-component-analysis-pca">Principal Component Analysis (PCA)</h4>
<pre tabindex="0"><code>Goal: Find directions of maximum variance in data

Process:
1. Center data: X̃ = X - μ (subtract mean)
2. Compute covariance matrix: C = X̃ᵀX̃/(n-1)
3. Find eigenvalues/eigenvectors of C
4. Principal components = eigenvectors
5. Explained variance = eigenvalues

Applications:
• Dimensionality reduction
• Data visualization
• Feature extraction
• Noise reduction
</code></pre><h4 id="markov-chains">Markov Chains</h4>
<pre tabindex="0"><code>State transition matrix P where Pᵢⱼ = P(state j | state i)

Steady state: πP = π (π is left eigenvector for eigenvalue 1)

Example: Weather model
P = [0.7  0.3]    (70% chance sunny→sunny, 30% sunny→rainy)
    [0.4  0.6]    (40% chance rainy→sunny, 60% rainy→rainy)

Long-term probabilities: π = [4/7  3/7] ≈ [0.571  0.429]
</code></pre><h4 id="least-squares-regression">Least Squares Regression</h4>
<pre tabindex="0"><code>Fit y = Xβ + ε to minimize ||y - Xβ||²

Normal equations: XᵀXβ = Xᵀy
Solution: β = (XᵀX)⁻¹Xᵀy

Using QR decomposition: X = QR
β = R⁻¹Qᵀy (more numerically stable)

Applications:
• Linear regression
• Polynomial fitting
• Parameter estimation
</code></pre><h3 id="engineering-and-physics">Engineering and Physics</h3>
<h4 id="finite-element-method">Finite Element Method</h4>
<pre tabindex="0"><code>Discretize partial differential equations using matrix equations:
Ku = f

where:
• K is stiffness matrix (system properties)
• u is displacement/solution vector
• f is force/load vector

Applications:
• Structural analysis
• Heat transfer
• Electromagnetics
• Fluid dynamics
</code></pre><h4 id="control-systems">Control Systems</h4>
<pre tabindex="0"><code>State-space representation:
ẋ = Ax + Bu    (state equation)
y = Cx + Du    (output equation)

System properties from eigenvalues of A:
• Stability: all eigenvalues have negative real parts
• Controllability: rank([B AB A²B ... Aⁿ⁻¹B]) = n
• Observability: rank([Cᵀ AᵀCᵀ ... (Aᵀ)ⁿ⁻¹Cᵀ]) = n

Transfer function: G(s) = C(sI - A)⁻¹B + D
</code></pre><h4 id="network-analysis">Network Analysis</h4>
<pre tabindex="0"><code>Adjacency matrix A: Aᵢⱼ = 1 if edge from i to j, 0 otherwise

Graph properties:
• Connectivity: powers of A
• Shortest paths: matrix powers
• Centrality measures: eigenvectors
• PageRank: dominant eigenvector of modified adjacency matrix

Laplacian matrix: L = D - A (D is degree matrix)
• Eigenvalues reveal graph connectivity
• Second smallest eigenvalue (Fiedler value) measures connectivity
</code></pre><h3 id="numerical-methods">Numerical Methods</h3>
<h4 id="iterative-methods-for-linear-systems">Iterative Methods for Linear Systems</h4>
<p><strong>Jacobi Method:</strong></p>
<pre tabindex="0"><code>For Ax = b, split A = D + L + U:
x^(k+1) = D⁻¹(b - (L + U)x^(k))

Convergence: if A is diagonally dominant
</code></pre><p><strong>Gauss-Seidel Method:</strong></p>
<pre tabindex="0"><code>x^(k+1) = (D + L)⁻¹(b - Ux^(k))

Generally faster convergence than Jacobi
</code></pre><h4 id="eigenvalue-algorithms">Eigenvalue Algorithms</h4>
<p><strong>Power Method:</strong></p>
<pre tabindex="0"><code>Find dominant eigenvalue and eigenvector:
v^(k+1) = Av^(k) / ||Av^(k)||

Converges to eigenvector of largest |λ|
</code></pre><p><strong>QR Algorithm:</strong></p>
<pre tabindex="0"><code>Iteratively compute A = Q₁R₁, A₁ = R₁Q₁, repeat
Converges to upper triangular matrix with eigenvalues on diagonal
</code></pre><h2 id="computational-considerations">Computational Considerations</h2>
<h3 id="numerical-stability">Numerical Stability</h3>
<pre tabindex="0"><code>Issues:
• Round-off errors accumulate
• Condition number affects accuracy
• Some algorithms more stable than others

Best practices:
• Use QR instead of normal equations for least squares
• Partial pivoting in Gaussian elimination
• SVD for rank-deficient problems
• Iterative refinement for improved accuracy
</code></pre><h3 id="complexity-analysis">Complexity Analysis</h3>
<pre tabindex="0"><code>Operation complexities for n×n matrices:
• Matrix addition: O(n²)
• Matrix multiplication: O(n³) naive, O(n^2.81) Strassen
• Gaussian elimination: O(n³)
• LU decomposition: O(n³)
• QR decomposition: O(n³)
• SVD: O(n³)
• Eigenvalue computation: O(n³)

Memory considerations:
• Dense matrices: O(n²) storage
• Sparse matrices: store only non-zeros
• Band matrices: exploit structure
</code></pre><h3 id="software-and-implementation">Software and Implementation</h3>
<pre tabindex="0"><code>High-performance libraries:
• BLAS (Basic Linear Algebra Subprograms)
• LAPACK (Linear Algebra Package)
• Eigen (C++)
• NumPy/SciPy (Python)
• MATLAB

Parallel computing:
• Matrix operations naturally parallelizable
• GPU acceleration (CUDA, OpenCL)
• Distributed computing for very large matrices
</code></pre><h2 id="practice-problems">Practice Problems</h2>
<h3 id="basic-operations">Basic Operations</h3>
<pre tabindex="0"><code>1. Given A = [1  2] and B = [5  6], compute:
             [3  4]         [7  8]
   a) A + B
   b) AB
   c) det(A)
   d) A⁻¹

2. For A = [2  1  0]
          [1  2  1], find det(A)
          [0  1  2]

3. Solve the system using matrices:
   2x + y = 5
   x + 3y = 8
</code></pre><h3 id="eigenvalues-and-eigenvectors-1">Eigenvalues and Eigenvectors</h3>
<pre tabindex="0"><code>1. Find eigenvalues and eigenvectors of A = [3  1]
                                           [0  2]

2. Determine if A = [4  2] is diagonalizable
                    [1  3]

3. For symmetric matrix S = [2  1], find orthogonal diagonalization
                           [1  2]
</code></pre><h3 id="applications">Applications</h3>
<pre tabindex="0"><code>1. A 2D point (3, 4) is rotated 90° counterclockwise. 
   Find the transformation matrix and new coordinates.

2. In a Markov chain with transition matrix P = [0.8  0.2]
                                                [0.3  0.7]
   find the steady-state probabilities.

3. Use least squares to fit y = ax + b to points: (1,2), (2,3), (3,5), (4,4)
</code></pre><h2 id="answer-key">Answer Key</h2>
<h3 id="basic-operations-1">Basic Operations</h3>
<pre tabindex="0"><code>1. a) A + B = [6  8 ]
              [10 12]
   
   b) AB = [19  22]
           [43  50]
   
   c) det(A) = 1·4 - 2·3 = -2
   
   d) A⁻¹ = [-2   1 ]
            [1.5 -0.5]

2. det(A) = 2(4-1) - 1(2-0) + 0 = 6 - 2 = 4

3. [2  1][x] = [5] → x = [1]
   [1  3][y]   [8]     y   [2]
</code></pre><h3 id="eigenvalues-and-eigenvectors-2">Eigenvalues and Eigenvectors</h3>
<pre tabindex="0"><code>1. Characteristic equation: (3-λ)(2-λ) = 0
   λ₁ = 3: v₁ = [1], λ₂ = 2: v₂ = [1]
              [0]              [-1]

2. det(A - λI) = λ² - 7λ + 10 = 0
   λ₁ = 5, λ₂ = 2 (distinct eigenvalues → diagonalizable)

3. λ₁ = 3: v₁ = [1], λ₂ = 1: v₂ = [ 1]
              [1]              [-1]
   
   P = [1/√2   1/√2 ], D = [3  0]
       [1/√2  -1/√2]       [0  1]
</code></pre><h3 id="applications-1">Applications</h3>
<pre tabindex="0"><code>1. R(90°) = [0  -1], new point = [0  -1][3] = [-4]
            [1   0]              [1   0][4]   [3]

2. Solve πP = π: π = [3/5  2/5] = [0.6  0.4]

3. X = [1  1], y = [2], β = (XᵀX)⁻¹Xᵀy = [1.3]
       [2  1]      [3]                     [0.5]
       [3  1]      [5]
       [4  1]      [4]
   
   Best fit line: y = 1.3 + 0.5x
</code></pre><h2 id="quick-reference">Quick Reference</h2>
<h3 id="essential-formulas">Essential Formulas</h3>
<ul>
<li><strong>Matrix multiplication</strong>: (AB)ᵢⱼ = Σₖ aᵢₖbₖⱼ</li>
<li><strong>Determinant (2×2)</strong>: ad - bc</li>
<li><strong>Matrix inverse (2×2)</strong>: (1/det(A)) × [d  -b; -c  a]</li>
<li><strong>Eigenvalue equation</strong>: det(A - λI) = 0</li>
<li><strong>Characteristic polynomial</strong>: det(A - λI) = 0</li>
</ul>
<h3 id="key-properties">Key Properties</h3>
<ul>
<li>(AB)ᵀ = BᵀAᵀ</li>
<li>(AB)⁻¹ = B⁻¹A⁻¹</li>
<li>det(AB) = det(A)det(B)</li>
<li>tr(A) = sum of eigenvalues</li>
<li>det(A) = product of eigenvalues</li>
</ul>
<h3 id="matrix-types">Matrix Types</h3>
<ul>
<li><strong>Symmetric</strong>: A = Aᵀ</li>
<li><strong>Orthogonal</strong>: AAᵀ = I</li>
<li><strong>Positive definite</strong>: xᵀAx &gt; 0 for all x ≠ 0</li>
<li><strong>Diagonal</strong>: non-zero elements only on main diagonal</li>
<li><strong>Identity</strong>: Iᵢⱼ = 1 if i = j, 0 otherwise</li>
</ul>
<h2 id="history-and-applications">History and Applications</h2>
<p>Understanding the historical development and real-world applications of matrices provides valuable context for their importance in modern mathematics and science:</p>
<iframe width="1512" height="776" src="https://www.youtube.com/embed/srfzaMTYJqg" title="History of Matrices - Usage of matrices in real-time situations." frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
<h2 id="see-also">See Also</h2>
<ul>
<li><strong><a href="../basic-math">BasicMath</a></strong>: Foundation arithmetic and number systems</li>
<li><strong><a href="../algebra">Algebra</a></strong>: Working with variables and equations - systems of equations foundation</li>
<li><strong><a href="../geometry">Geometry</a></strong>: Shapes, areas, and spatial relationships</li>
<li><strong><a href="../statistics">Statistics</a></strong>: Data analysis and probability - correlation matrices, PCA</li>
<li><strong><a href="../pre-calculus">Pre-Calculus</a></strong>: Advanced functions and mathematical analysis</li>
<li><strong><a href="../calculus">Calculus</a></strong>: Multivariable calculus and Jacobian matrices</li>
<li><strong><a href="../differential-equations">Differential Equations</a></strong>: Matrix methods for solving systems of DEs</li>
<li><strong><a href="../numerical-methods">Numerical Methods</a></strong>: Computational linear algebra and iterative methods</li>
<li><strong><a href="../complex-numbers">Complex Numbers</a></strong>: Complex matrices and eigenvalue problems</li>
</ul>
]]></content:encoded></item></channel></rss>