![A clean, three-step infographic diagram explaining how facial recognition might work with linear algebra. Step 1 ('Capture & Vectorize'): On the left, show a simple, stylized icon of a human face. An arrow points from it to a representation of a vector (a list of numbers in brackets like [0.2, -0.9, 0.5,...]). Label this step '1. Face becomes a Vector'. Step 2 ('Compare'): In the center, show the new 'Live Vector' and a 'Stored Vector' from a database icon. An illustration should show a mathematical operation between them, perhaps using a dot • symbol to represent the dot product, resulting in a 'Similarity Score' (e.g., 'Score: 0.98'). Label this step '2. Compare Vectors (Dot Product)'. Step 3 ('Decision'): On the right, show the 'Similarity Score' being compared against a 'Threshold' (e.g., 'Threshold: 0.95'). An arrow points to a final icon of an 'Unlocked' padlock, indicating a successful match. Label this step '3. Unlock if Score > Threshold'. The overall style is modern, minimalist, and educational, with a clean color palette on a neutral background.](https://sequentia.space/wp-content/uploads/2026/02/126.jpg)
Series: The Sequentia Lectures: Unlocking the Math of AI
Part 2: The AI Toolkit: Linear Algebra
Lecture 15: Linear Algebra in Action: How Your Face ID Might Use These Concepts
We’ve journeyed through the core tools of linear algebra: vectors, matrices, dot products, and eigenvectors. We’ve talked about data landscapes and transformations. Now, let’s connect all these dots with a powerful, real-world example that many of us use every day: facial recognition, like the technology behind your phone’s Face ID.
While the exact proprietary algorithms are secret, we can build a strong, intuitive understanding of how such a system might work using the very concepts we’ve just learned.
Step 1: The Face as a Vector (“Face-Vector”)
First, the system needs to “see” your face. As we learned in Lecture 2, an image is just a grid of pixel values. But a facial recognition system doesn’t just use the raw pixels. That would be too sensitive to changes in lighting, angle, or expression.
Instead, a sophisticated AI model (often a deep neural network) is trained to look at a photo of a face and extract its most important, distinguishing features. It learns to ignore the background and the lighting and focus on the fundamental structure: the distance between the eyes, the shape of the nose, the curve of the jawline, and hundreds of other subtle measurements.
The output of this process is a vector—a list of numbers, perhaps 128 or 512 dimensions long, that serves as a unique mathematical signature for that face. Let’s call this a “face-vector.”
This face-vector is a single point in a high-dimensional “face space.” Your face-vector is a unique address in this landscape.
Step 2: Storing Your Identity
When you set up Face ID for the first time, you show your face to the camera from multiple angles. The system generates a face-vector for each of these images and likely averages them or stores them as a small, representative cluster of points in the “face space.” This stored vector (or cluster) is now the mathematical definition of “you” in the system’s database.
Step 3: The Unlock Attempt – Finding the Closest Match
Now, you pick up your phone to unlock it.
- The camera captures a live image of your face.
- The same AI model instantly processes this new image and generates a new face-vector for the person currently looking at the phone.
- Here’s where the linear algebra kicks in: The system now needs to compare this new, live face-vector with the stored face-vector from its database.
How does it measure how “similar” they are?
Using the Dot Product as a Similarity Detector!
As we learned in Lecture 8, the dot product is a fantastic measure of alignment or similarity between two vectors.
- The system calculates the dot product (or a related metric like “cosine similarity,” which is just the normalized dot product) between the live face-vector and the stored face-vector.
- If the two vectors are pointing in very similar directions in the high-dimensional “face space” (meaning the faces are very similar), the dot product will be very high.
- If the vectors are pointing in different directions (a different person’s face), the dot product will be much lower.
The system has a pre-defined threshold. If the similarity score from the dot product is above this threshold, it concludes: “This is a match!” The phone unlocks. If the score is below the threshold, it denies access.
Putting It All Together:
- Vectors: Represent faces as unique points in a high-dimensional space.
- Matrices (in the Neural Network): The AI model that transforms a raw image into a stable face-vector is built on a series of matrix multiplications.
- Dot Product: Acts as the final, efficient similarity detector to compare the live face to the stored one.
- Eigenvectors (Implicitly): The AI model is trained to find the “principal components” of a face. It learns the most important directions of variation (the eigenvectors of face data) to create a robust face-vector that is resistant to minor changes like lighting.
This entire, seemingly magical process can be broken down into the fundamental operations of linear algebra that we’ve been exploring. It’s a testament to how these “abstract” mathematical tools are the true engines powering some of our most advanced and personal technology.
This concludes Part 2 of our series. With this solid foundation in linear algebra, we are now ready to move into Part 3, where we will build our very first predictive model from scratch: Linear Regression.