The mathematical foundation of the Moore-Penrose pseudoinverse rests on Singular Value Decomposition (SVD), providing both theoretical elegance and computational robustness:
SVD-Based Pseudoinverse Algorithm:
Given matrix A ∈ ℝᵐˣⁿ, compute its SVD: A = UΣVᵀ where U ∈ ℝᵐˣᵐ and V ∈ ℝⁿˣⁿ are orthogonal matrices, and Σ ∈ ℝᵐˣⁿ contains singular values σ₁ ≥ σ₂ ≥ ... ≥ σᵣ > 0 on the diagonal.
The pseudoinverse is constructed as A⁺ = VΣ⁺Uᵀ, where Σ⁺ ∈ ℝⁿˣᵐ has entries: Σ⁺[i,i] = 1/σᵢ if σᵢ > tolerance, and Σ⁺[i,i] = 0 otherwise.
Detailed Example: 3×2 Matrix Computation
Consider A = [1,2; 3,4; 5,6]. First, compute AᵀA = [35,44; 44,56] and AAᵀ = [5,11,17; 11,25,39; 17,39,61]. The singular values are σ₁ ≈ 9.526 and σ₂ ≈ 0.514.
The SVD decomposition yields specific U, Σ, and V matrices. Computing Σ⁺ by inverting non-zero singular values gives σ₁⁺ ≈ 0.105 and σ₂⁺ ≈ 1.946.
Theoretical Properties and Verification:
The four defining properties can be verified algebraically: (1) AA⁺A = UΣVᵀVΣ⁺UᵀUΣVᵀ = UΣVᵀ = A, confirming the first Moore-Penrose condition.
For least squares applications, the solution x = A⁺b minimizes ||Ax - b||² over all possible x. This follows from the orthogonal projection properties inherent in the SVD construction.
Computational Complexity and Optimization:
The SVD computation has O(min(mn², m²n)) complexity. For large matrices, randomized SVD or iterative methods can provide significant speedups while maintaining acceptable accuracy for most applications.