Skip to content

Module 1: Linear Algebra (The Grocery List)

📚 Module 1: Linear Algebra

Course ID: MATH-201
Subject: The Grocery List of Data

In AI, Linear Algebra is the primary language. Every piece of data—be it an image, a word, or a sound—is converted into a numerical vector or matrix before processing.


🏗️ Step 1: The Vector (The “Grocery List”)

A Vector is just a list of numbers that belong together.

🛒 The Analogy: The Shopping Trip

Imagine you are at the store. You have a list:

  • Apples: 3
  • Bananas: 5
  • Carrots: 2

In math, we write this as a vector: v=[3,5,2]\mathbf{v} = [3, 5, 2]


🏗️ Step 2: The Dot Product (The “Receipt”)

This is the most important operation in all of AI. It’s how a model makes a decision.

🧾 The Analogy: The Total Cost

Now, imagine each item has a Price (a “Weight”):

  • Apple Price: $1.00
  • Banana Price: $0.50
  • Carrot Price: $2.00

We write these prices as another vector (the Weight Vector): w=[1.0,0.5,2.0]\mathbf{w} = [1.0, 0.5, 2.0]

To find your Total Bill, you multiply each quantity by its price and add them up: (3×1.0)+(5×0.5)+(2×2.0)=3+2.5+4=9.5(3 \times 1.0) + (5 \times 0.5) + (2 \times 2.0) = 3 + 2.5 + 4 = 9.5

This is the Dot Product!


🏗️ Step 3: The Matrix (The “Spreadsheet”)

A Matrix is just a stack of vectors. It’s like a spreadsheet where each row is a different person’s grocery list.

📊 The Analogy: The Store Inventory

  • Person A: [3, 5, 2]
  • Person B: [1, 0, 8]
  • Person C: [4, 4, 4]

We stack them to make a Matrix X\mathbf{X}: X=[352108444]\mathbf{X} = \begin{bmatrix} 3 & 5 & 2 \\ 1 & 0 & 8 \\ 4 & 4 & 4 \end{bmatrix}


🥅 Module 1 Review

  1. Vector: A single list of data (one person’s features).
  2. Dot Product: Multiplying data by weights and adding them up (making a decision).
  3. Matrix: A stack of vectors (a whole dataset).
  4. Shape: The most important rule—the numbers must line up!

:::tip Slow Learner Note Don’t worry if this feels abstract. Just remember the Grocery List and the Receipt. That is 90% of what a Neural Network does every second! :::