LU Decomposition Visualizer

Interactive visualization & performance benchmarks

What is LU Decomposition?

LU decomposition factors a matrix A into the product of a lower triangular matrix (L) and an upper triangular matrix (U). This is useful for solving systems of linear equations, computing determinants, and matrix inversion.

A = L × U
1x

Matrix A (Input)

Matrix L (Lower Triangular)

Matrix U (Upper Triangular)

Current Step

Enter values in Matrix A or generate a random matrix, then click "Start Decomposition" to begin.

Performance Analysis

Real benchmark results comparing Sequential, OpenMP, and Pthreads implementations on various matrix sizes and thread counts. Tests performed on actual hardware to measure parallelization efficiency.

CPU: Ryzen 9 5900HS (8C/16T)
RAM: 16 GB
OS: Ubuntu 24.04
Compiler: GCC 14.1 -O3
6.2×
Peak OpenMP Speedup
3.1×
Peak Pthreads Speedup
8
Optimal Thread Count
O(N³)
Algorithm Complexity

OpenMP Performance

Pthreads Performance

OpenMP vs Pthreads — Best Speedup Comparison

Detailed Results

OpenMP Runtimes (seconds)

Matrix Size Sequential 1 Thread 2 Threads 4 Threads 8 Threads 16 Threads
500×500 0.0255 0.0141 0.0082 0.0061 0.0066 0.0307
1000×1000 0.2021 0.1065 0.0558 0.0471 0.0327 0.0612
1500×1500 1.1206 0.7358 0.3470 0.2036 0.2868 0.3013
2000×2000 2.9234 2.7630 2.0936 1.8705 1.6748 2.5432

Pthreads Runtimes (seconds)

Matrix Size Sequential 1 Thread 2 Threads 4 Threads 8 Threads 16 Threads
500×500 0.0255 0.0118 0.0278 0.0496 0.0875 0.1669
1000×1000 0.2021 0.0990 0.0920 0.1188 0.2212 0.3476
1500×1500 1.1206 0.7468 0.4443 0.3638 0.5221 0.7597
2000×2000 2.9234 2.5724 1.4303 1.4503 1.6226 1.9806