What is the difference between a sparse and dense matrix?

What is the difference between a sparse and dense matrix?

Approach: Compare the number of non-zero elements.

A sparse matrix has mostly zero elements; a dense matrix has mostly non-zero elements. Sparse matrices are stored in specialized formats to save memory.

Follow-up: What is the 'density' of a matrix?

Key concepts: zeros, storage efficiency.