AI engineering glossary · Linear algebra

What is sparse vector?

Sparse vector: A vector in which most components are zero, stored compactly as index-value pairs. Bag-of-words and keyword-weight representations of text are sparse vectors, unlike the dense vectors produced by embedding models.

Level: intermediateTopic: Linear algebra

Sparse vector: an example

A 50,000-word vocabulary vector for a tweet with 12 distinct words has 12 non-zero entries and 49,988 zeros.

Related terms

More Linear algebra terms

Where you learn it

Sparse vector 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.