CSR format: 3 arrays - values (nonzeros), column indices, row pointers. Matvec only touches nnz entries. At 90% sparsity, CSR uses 10× less memory than dense.
Sparse Matrix Methods - Interactive Visualization
Most matrices in large-scale ML are sparse - adjacency matrices, graph Laplacians, NLP document-term matrices. Storing them in dense format wastes memory; sparse formats (CSR/CSC) store only non-zero values. This visualization shows the dense matrix and its CSR representation simultaneously, animating a matrix-vector multiply to show which entries are accessed.
Adjust sparsity slider to see entries zero out
See CSR storage: values, column indices, row pointers arrays
Watch matrix-vector multiply animate, skipping zero entries
Compare memory for dense (n²) vs CSR (2·nnz + n) storage
Foundation for sparse neural networks, graph convolutions, and large-scale ML
Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.