Recommended resources
The freely available resources this lesson will direct you to.
Hi! This course starts by rebuilding the mathematical language you will need before working with vectors, matrices, calculus, probability, and eventually the calculations inside language models. In this first module, you will move from everyday arithmetic to algebraic expressions and equations, then use Python and NumPy to check work you already understand by hand.
Today’s goal is smaller: read a piece of basic algebra and explain what each part means. You do not need to solve equations yet. Allow about 35–40 minutes, including the short videos and time to pause at the examples.
Numbers describe the quantities
Suppose a notebook costs 4 currency units. You buy 3 notebooks and pay 2 currency units for delivery. The numbers describe different things: 4 is the price per notebook, 3 is the number of notebooks, and 2 is the delivery charge. Keeping those meanings attached to the numbers is more useful than memorizing a string of symbols.
Numbers can describe many kinds of quantities. A count might be a whole number such as ; a measured weight might be ; and a balance below zero might be . Context matters: makes sense for a balance, but not for the number of notebooks you physically bought.
Algebra becomes useful when you want to describe more than one purchase. The notebook price and delivery charge can stay fixed while the number bought changes. Instead of writing a separate calculation for every possible count, you can give that changing count a symbol.
Variables give changing or unknown quantities a name
Let mean “the number of notebooks bought.” Here, is a variable: it stands for a number that can differ from one purchase to another. It might be 1 in one purchase and 3 in another. A variable can also stand for a number you have not found yet.
Watch how the video introduces this idea and turns an everyday price into a mathematical relationship.
Introduction to Algebra: Using Variables
Watch “Introduction to Algebra: Using Variables” from Professor Dave Explains for a short introduction to variables, constants, and prices.
Start with variables and constants, noting what each kind of symbol represents. Continue through everyday expressions; focus on how a fixed price and a changing number of items produce different totals.
For our notebook purchase, let mean “the total cost.” We can write:
Read this as: “The total cost is four times the number of notebooks, plus two for delivery.” The letters are not special numbers. They are short names for quantities, and stating what each letter means makes the expression understandable.
There is one important rule when reading a particular calculation: the same variable keeps the same value throughout that calculation. If means 3 notebooks, every in that calculation means 3 notebooks. In another purchase, may mean 5.
Algebra Basics: What Is Algebra? - Math Antics
Watch the variables portion of “Algebra Basics: What Is Algebra?” from Math Antics to make that same-symbol rule concrete.
Begin at consistent variables. Pay particular attention to the example with two appearances of the same letter: they cannot stand for two different numbers at the same time.
A constant is a value held fixed in the situation you are describing. In , the numbers and are constants: this particular purchase rule uses a price of 4 per notebook and a delivery charge of 2. The letters and are variables because the count and total can change together.
“Constant” does not mean “unchangeable everywhere.” If the shop changes its price tomorrow, you can describe tomorrow’s purchases with a new rule. Likewise, a letter can represent a fixed value if you explicitly define it that way. Whether something is variable or constant depends on the situation you are modeling, not simply on whether it is written as a letter or a digit.
Operators say what to do with the quantities
An operator tells you what arithmetic action to perform. The four basic ones are addition, subtraction, multiplication, and division. Using the notebook purchase, you could read them like this:
| Operation | Example | Meaning |
|---|---|---|
| Addition | Add 2 to a cost | |
| Subtraction | Take 2 off a cost | |
| Multiplication | Pay 4 for each of notebooks | |
| Division | Split a total into two equal shares |
In algebra, multiplication is often implied: means multiplied by , even though no multiplication sign appears between them. This makes expressions shorter, but it takes a moment to get used to.
Algebra Basics: What Is Algebra? - Math Antics
Return to the Math Antics video for its explanation of arithmetic operators and multiplication written without a visible sign.
Watch implied multiplication. Focus on why a number beside a letter means multiplication, while placing two ordinary numbers side by side would create a different number.
Consider the equation in this image:

You can read as a small purchase story: three items each cost , an extra charge is 4, and the total is 28. The is called a coefficient because it multiplies the variable . It is also a fixed number in this equation, just like and .
The equals sign deserves a separate thought. does not tell you to add, subtract, multiply, or divide. It says that the quantity on its left has the same value as the quantity on its right. In mathematical writing, alone is an expression; is an equation, a statement of equality.
That differs slightly from familiar Python syntax: n = 3 assigns a value to a name, while the mathematical equals sign states that two quantities are equal. Later lessons will show how to evaluate expressions and solve equations. For now, being able to say what their symbols mean is the foundation.
Why this language matters later
The calculations behind a language model also involve numbers with roles: an input can vary, while some numerical settings are held fixed during a particular calculation. Before you can understand a larger formula, you need the same habit used here: identify each quantity, decide what can change, and read each operation in words.
The key distinctions are:
- A number gives a value, such as or .
- A variable names a quantity whose value may change or is not yet known.
- A constant is held fixed within the situation being described.
- An operator specifies an arithmetic action; the equals sign states equality.
Next, you will take expressions like and evaluate them carefully, step by step, using the order of operations.