AI engineering glossary · Linear algebra

What is sparse matrix?

Sparse matrix (also called Sparse array): A matrix in which most entries are zero, so it is stored by recording only the non-zero values and their positions. This saves memory and speeds up arithmetic for data such as word counts or user-item ratings.

Level: intermediateTopic: Linear algebra

Sparse matrix: an example

A 1,00,000 x 50,000 user-by-product matrix where each user bought about 20 items is over 99.9 percent zeros and is stored as a sparse matrix.

Related terms

More Linear algebra terms

Where you learn it

Sparse matrix is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.