The Vector (State & Identity) hero
Lesson 1Linear Algebra Part 1 (Vectors & Dot Products)

The Vector (State & Identity)

Learn how real-world data is structured into ordered numeric lists and vector coordinates to create mathematical identity profiles in AI systems.

Before we dive into AI, we need to understand the language it speaks.

We experience AI through text, images, and speech. But underneath the surface, modern AI relies on a mathematical system called a neural network—and it cannot process words or pictures at all.

It only understands ordered lists of numbers.

Linear algebra is simply the mathematics of organizing and multiplying these lists of numbers efficiently.


In linear algebra, a vector is simply a 1-dimensional list of numbers, standardly written as a vertical column.

The Feature Vector: Mathematical Fingerprints

A vector isn't just a random list of numbers. To a neural network, it acts as a mathematical ID badge or profile for anything in the real world—an object, a scenario, or a person. Computers cannot understand abstract ideas—they can only compute with measurements. A vector is how we translate a real-world concept into numbers a computer can process.

Let's use a very simple real-world example: A Grocery List. Imagine you are trying to mathematically describe your shopping needs for the week. We can break your "needs" down into three distinct categories, or characteristics: Apples, Bananas, and Carrots.

You can represent your specific shopping profile as a vector xx:

x=[231](Apples)(Bananas)(Carrots)x = \begin{bmatrix} 2 \\ 3 \\ 1 \end{bmatrix} \begin{matrix} \text{(Apples)} \\ \text{(Bananas)} \\ \text{(Carrots)} \end{matrix}

In the language of neural networks:

  • This vector has a dimension of 3 (it tracks 3 specific items). We write this mathematically as xR3x \in \mathbb{R}^3.
  • Each individual entry is called a feature. A feature is a single characteristic or attribute (such as Apple count).
  • The entire list together is called a Feature Vector. A feature vector is just a list representing the exact measurements of each of those features.

A feature vector is the complete mathematical fingerprint of whatever we want to represent. In our example, xyoux_{\text{you}} uniquely describes your shopping trip. If a friend visits the same store to buy different items, their trip is captured by a separate vector, xfriendx_{\text{friend}}:

xyou=[231](Apples)(Bananas)(Carrots)xfriend=[050](Apples)(Bananas)(Carrots)x_{\text{you}} = \begin{bmatrix} 2 \\ 3 \\ 1 \end{bmatrix} \begin{matrix} \text{(Apples)} \\ \text{(Bananas)} \\ \text{(Carrots)} \end{matrix} \qquad\qquad x_{\text{friend}} = \begin{bmatrix} 0 \\ 5 \\ 0 \end{bmatrix} \begin{matrix} \text{(Apples)} \\ \text{(Bananas)} \\ \text{(Carrots)} \end{matrix}

Even though both vectors track the exact same three features, they represent completely different profiles because the measurements changed. By converting real-world things into feature vectors, we give neural networks concrete numbers to compute with.

The Golden Rule: Position is Identity

In a vector, values alone are meaningless without their order. Position is what gives each number its identity.

If Position 1 is Apples and Position 2 is Bananas:

x=[23](2 Apples)(3 Bananas)swapxswapped=[32](3 Apples)(2 Bananas)x = \begin{bmatrix} 2 \\ 3 \end{bmatrix} \begin{matrix} \text{(2 Apples)} \\ \text{(3 Bananas)} \end{matrix} \qquad \xrightarrow{\text{swap}} \qquad x_{\text{swapped}} = \begin{bmatrix} 3 \\ 2 \end{bmatrix} \begin{matrix} \text{(3 Apples)} \\ \text{(2 Bananas)} \end{matrix}

The numbers 22 and 33 didn't change, but swapping their positions completely changed the real-world meaning. The math will now blindly assume you have 3 Apples and 2 Bananas.

Here is how real-world systems lock feature positions to compare different items:

  • Real Estate (Housing Specs): A property platform locks four physical specs in order: [Price ($M), Bedrooms, Area (k sq ft), Distance to Downtown (mi)].

    xMansion=[1.55.06.030.0]vs.xStudio=[0.81.00.70.5]x_{\text{Mansion}} = \begin{bmatrix} 1.5 \\ 5.0 \\ 6.0 \\ 30.0 \end{bmatrix} \qquad \mathbf{vs.} \qquad x_{\text{Studio}} = \begin{bmatrix} 0.8 \\ 1.0 \\ 0.7 \\ 0.5 \end{bmatrix}

    A $1.5M suburban mansion (5 beds, 6k sq ft, 30 mi commute) vs. an $800k downtown studio (1 bed, 700 sq ft, 0.5 mi commute).

  • Streaming (Movie Genre Profiles): Netflix rates genre intensity from 0.00.0 (none) to 1.01.0 (maximum) in locked order: [Action, Romance, Comedy, Sci-Fi].

    xDie Hard=[1.00.00.51.0]vs.xNotebook 2=[0.01.00.50.0]x_{\text{Die Hard}} = \begin{bmatrix} 1.0 \\ 0.0 \\ 0.5 \\ 1.0 \end{bmatrix} \qquad \mathbf{vs.} \qquad x_{\text{Notebook 2}} = \begin{bmatrix} 0.0 \\ 1.0 \\ 0.5 \\ 0.0 \end{bmatrix}

    An Action/Sci-Fi blockbuster (1.0,0.0,0.5,1.01.0, 0.0, 0.5, 1.0) vs. a pure Romance (0.0,1.0,0.5,0.00.0, 1.0, 0.5, 0.0).

Locking the order means the computer always pairs the right feature with the right calculation. If you scramble the order, you scramble the meaning—and the math collapses.

To see how this structural rule creates a machine-readable ID badge, examine the anatomy of a 4-dimensional movie vector below:

Anatomy of a 4-dimensional Feature Vector
Every feature vector stacks its measurements vertically along the Y-axis. The locked index positions (Index 1 to 4) determine the identity of each feature, translating qualitative attributes into concrete numbers a neural network can process.

Notice the three distinct layers at work: the Position Index acts as the permanent address, the Feature Label provides human semantic meaning, and the Numerical Measurement (x1,x2,x3,x4x_1, x_2, x_3, x_4) provides the raw mathematical scalar. In neural networks, the computer discards the human word labels entirely and operates strictly on the measurements at their locked index addresses. This vertical stack along the Y-axis is the exact orientation we will use to feed data into neural network layers.


Back to Catalog