Mathematics / LU Decomposition
FREE TO EXPLORE
LABORATORY 12 · MATHEMATICS

LU Decomposition lab report

A worked lu decomposition lab report with iteration data tables, logarithmic graphs, calculations, uncertainty and conclusions.

WORKED EXAMPLE · BENCHMARK OBSERVATIONS

A complete example laboratory report.

Simulated demonstration data.

This report illustrates formal numerical analysis, iteration tracking, and convergence rate extraction. Replace its observations with your own computational telemetry when preparing a practical submission.

Student: __________________Student ID: __________________Course: __________________Date: __________________Partner: __________________Instructor: __________________

1. Title and aim

LU Triangular Matrix Factorization and Forward-Backward Substitution. Factorize square non-singular matrices A into unit lower-triangular matrix L and upper-triangular matrix U (PA = LU) using Doolittle and Crout algorithms, solve multiple right-hand-side vectors in O(n²) time via forward and back substitution, and extract the asymptotic factorization constant C = 2/3 ≈ 0.667 via linear regression.

2. Abstract

Six computational trials were executed across standardized inputs n = 10.0 to n = 60.0 for LU Triangular Matrix Factorization and Forward-Backward Substitution. An ordinary least-squares regression yielded an empirical Factorization Multiplier C of 0.667 (difference from theoretical reference = 0.0501%). The empirical telemetry conclusively validates the theoretical model and complexity scaling with R² = 1.000000.

3. Apparatus and fixed settings

4. Theory and graph choice

LU decomposition—introduced by English mathematician Alan Turing in his historic 1948 paper 'Rounding-Off Errors in Matrix Processes' and independently developed by Polish astronomer Tadeusz Banachiewicz—is the mathematical cornerstone of numerical linear algebra. While Gaussian elimination combines matrix triangularization with the right-hand-side vector, LU decomposition decouples the two processes. Turing recognized that the elementary row operations of Gaussian elimination can be represented as multiplication by lower-triangular elementary matrices, effectively factoring the coefficient matrix into the product of two triangular matrices: A = LU, where L is lower-triangular and U is upper-triangular. When row pivoting is incorporated to maintain numerical stability, the factorization takes the canonical form PA = LU, where P is a permutation matrix. The true power of LU decomposition emerges when solving linear systems with multiple right-hand-side vectors: Ax = b becomes P(LU)x = b, or L(Ux) = Pb. Defining an intermediate vector y = Ux, the solution is obtained in two rapid stages: (1) Forward substitution: solve the lower-triangular system Ly = Pb for y in n² operations; and (2) Backward substitution: solve the upper-triangular system Ux = y for x in n² operations. While factoring A requires (2/3)n³ operations, once L and U are computed, each subsequent solution vector requires only 2n² operations. For a system with m right-hand sides, LU decomposition reduces computational effort from m·(2/3)n³ to (2/3)n³ + m·2n², delivering speedups of hundreds or thousands of times in structural dynamics, time-dependent partial differential equations, and control theory. In this computational laboratory, students evaluate Doolittle LU factorization across dense matrices from n = 10 to n = 60, verify in-place matrix storage, execute dual-phase triangular substitutions, and extract the asymptotic factorization constant C = 2/3 ≈ 0.667 via ordinary least-squares regression.

\text{FLOPs}(n) = C \cdot \frac{n^3}{1000} \implies C = \frac{2}{3} \approx 0.667

The mathematical regression linearizes the relationship into the form y = mx + b. Here, the independent variable x represents Normalized Dimension Cubic n³/1000, and the dependent variable y represents Factorization Operations (kFLOPs). The slope m directly extracts Factorization Multiplier C, while the intercept b accounts for residual baseline offsets.

5. Method

  1. Select matrix dimension n ∈ {10, 20, 30, 40, 50, 60}. Initialize n×n dense matrix A and permutation vector P = [1, 2, ..., n].
  2. At stage k, locate pivot row p maximizing |a_{p,k}| for p ≥ k. Swap row k and row p in both A and P.
  3. For i = k+1 to n, compute multiplier l_{i,k} = a_{i,k} / a_{k,k} and store it directly in a_{i,k}. For j = k+1 to n, update u_{i,j} = a_{i,j} ← a_{i,j} − l_{i,k} · a_{k,j}.
  4. Continue the recurrence for k = 1 to n − 1. Upon completion, the upper triangle contains U and the strictly lower triangle contains L.
  5. Given vector b, permute Pb. Solve Ly = Pb via forward substitution in n² operations. Solve Ux = y via back substitution in n² operations.
  6. Plot factorization operations against normalized cubic coordinate n³/1000. Perform least-squares regression to extract empirical slope C = 0.667, confirming (2/3)n³ factorization complexity.

6. Observations and calculation table

All iterative observations use strictly controlled 64-bit IEEE 754 precision buffers. Residuals are computed relative to the ordinary least-squares regression line.

Table 1. Six simulated observations; x and y represent transformed mathematical metrics.
No.Matrix Dimension n (rows)LU Factorization Operations (kFLOPs)Normalized Dimension Cubic n³/1000Factorization Operations (kFLOPs)Fitted yResidual
110.00.6671.00000.66700.66670.0003
220.05.3338.00005.33305.3334-0.0004
330.018.027.000018.000018.0000-0.0000
440.042.66764.000042.667042.66670.0003
550.083.333125.000083.333083.3333-0.0003
660.0144.0216.0000144.0000143.99990.0001

Download the sample observations (CSV) ↓

7. Worked calculation for one observation

For dimension n = 10.0: Normalized cubic coordinate x = n³/1000 = 10.0³/1000 = 1.000. Cumulative operations y = C · x = 0.667 kFLOPs.

8. Graph, gradient and final calculation

-20.83-24.8025.7541.8572.33108.50118.92175.15165.50241.80Normalized Dimension Cubic n³/1000Factorization Operations (kFLOPs)

Circular markers represent empirical computational observations. The solid line represents the ordinary least-squares linear fit.

x̄ = 73.50000; ȳ = 49.00000
Σ(x − x̄)² = 34757.50000
Σ(x − x̄)(y − ȳ) = 23171.64400
m = Σ(x − x̄)(y − ȳ) / Σ(x − x̄)² = 0.66666601
b = ȳ − mx̄ = 4.7932e-05
FLOPs(n) = 0.6667 · (n³/1000) + 4.7932e-05 ⟹ C = 0.667 FLOPs/n³ (theoretical C = 0.667)

9. Uncertainty and comparison

Percentage difference = |estimate − theoretical value| / |theoretical value| × 100 = 0.0501%.

For n = 6 observations, Σresidual² = 4.2966e-07; s² = Σresidual²/(n − 2). Gradient standard error = √[s²/Σ(x − x̄)²] = 1.7580e-06. Intercept standard error = √[s²(1/n + x̄²/Σ(x − x̄)²)] = 1.8601e-04.

Propagating the fit parameters yields a fit standard error of 1.7580e-06 , with an ideal coefficient of determination R² = 1.000000.

In computational mathematics and numerical analysis, errors arise from algorithmic discretization, finite precision IEEE 754 floating-point arithmetic (machine epsilon ε_mach ≈ 2.22 × 10⁻¹⁶ for 64-bit double precision), and condition number propagation. The ordinary least-squares fit across n = 6 standardized observations provides standard errors for the gradient and intercept. Because the mathematical recurrence is evaluated with high numerical precision, the residual sum of squares is vanishingly small, yielding a coefficient of determination R² ≥ 0.999999 and confirming the theoretical mathematical model.

10. Result and discussion

Factorization Multiplier C = 0.667
Theoretical reference value: 0.667

The empirical benchmark observations provide rigorous quantitative verification of LU Triangular Matrix Factorization and Forward-Backward Substitution. In numerical analysis, scientific computing, and computational mathematics, algorithms are characterized by their asymptotic operational scaling, stability, and convergence rates. Across all six observations, the empirical slope m = 0.6667 confirms the theoretical model with near-zero residual variance. Furthermore, comparison with alternative algorithmic paradigms underscores critical trade-offs between memory footprint, condition number sensitivity, and operational throughput. The algorithm's behavior confirms the mathematical predictions established by numerical analysis literature.

11. Precautions and limitations

Dense LU factorization requires (2/3)n³ operations and O(n²) memory, becoming impractical for massive systems without sparsity. The numerical simulation model executes in-place Doolittle LU factorization across dense systems from n = [10, 20, 30, 40, 50, 60]. Normalized cubic coordinate: x = n³/1000 = [1.00, 8.00, 27.00, 64.00, 125.00, 216.00]. Theoretical factorization operations: FLOPs(n) = (2/3)n³ = [0.667, 5.333, 18.000, 42.667, 83.333, 144.000] kFLOPs. Ordinary least-squares linear regression on these coordinates produces an empirical slope C = 0.66667 and Y-intercept b = 0.000 with coefficient of determination R² = 1.000000. The empirical factorization multiplier C = 0.667 matches the theoretical benchmark C = 2/3 = 0.66667 within 0.0000% deviation.

12. Conclusion

This computational laboratory investigation quantitatively verified the mathematical formulation and asymptotic scaling of LU Triangular Matrix Factorization and Forward-Backward Substitution. Through rigorous tracking across six observation points, we confirmed an empirical Factorization Multiplier C of 0.667 matching the theoretical reference 0.667 within 0.0501% error. The investigation demonstrates why this method serves as an indispensable tool in modern computational science.