Welcome to your first lesson in linear algebra! Your goal is to understand the mathematics behind artificial intelligence, and our journey begins with the most fundamental building block of mathematical language: the variable. While it might seem simple, a clear grasp of what a variable is and why we use it is essential for everything that follows, from solving simple equations to understanding how AI models process vast amounts of data.
In this lesson, we will focus on answering one key question: What does a variable represent in a mathematical expression? By the end of our session, you will be able to explain this concept intuitively and see how it bridges the gap between everyday language and the formal language of mathematics.
From Uncertainty to Symbols
In everyday conversation, we often talk about quantities without knowing their exact value. We might say, "I'll be there in a few minutes," or "She ate some of the cookies." The phrases "a few" and "some" stand in for a number we don't need or don't care to specify.
Mathematics needs a more precise way to handle such unknowns. Instead of using vague words, we use symbols. This is the core idea of algebra.
To start, watch this short segment from the video "Introduction to Variables" by Nerdstudy. It does an excellent job of connecting our everyday use of numbers and uncertainty to the mathematical concept of a variable.
Please watch the first part of the video, from the beginning until the definition of a variable. Focus on the distinction between using a specific number (like '3') when you're certain, and needing a different tool when you're not.
As the video explains, a variable is a letter or symbol that represents an unknown numerical value. It's a way of talking about a number before we know exactly what it is.
The "Placeholder" or "Slot" Analogy
One of the most powerful ways to think about a variable is as a placeholder, like a blank space in a sentence or an empty box waiting to be filled.

This "placeholder" idea is more robust than thinking of a variable as "something that changes," which can sometimes be confusing. A variable doesn't vary on its own; it's a slot that we can put a number into.
Variables made easy | Scott Baldridge
The article "Variables made easy" by Scott Baldridge provides a very clear and precise definition. It argues for thinking of a variable as a placeholder.
Please read the first few paragraphs of the article, from the beginning down to the main point. Pay close attention to the definition of a variable as a "placeholder for a number" and the critique of the "quantity that varies" idea.
This idea of a variable being a slot for a number is fundamental. It means we can write down rules and relationships even before we know the specific numbers involved.
For example, imagine a restaurant bill that is $10 plus whatever you decide to leave for tips. We can represent this situation with an expression.
Here, is a placeholder for the amount of tip you'll leave. It could be $2, $3, or $5.50. The expression describes the total cost for any of these choices.
Putting Variables to Work
This ability to represent unknowns allows us to describe real-world situations in a general way.
Let's consider an example. Suppose a coffee shop makes $2 profit for every cup of coffee it sells. How can we describe the total profit they will make in the next hour? We don't know how many coffees they will sell. This is a perfect opportunity to use a variable.
The "Introduction to Variables" video we watched earlier continues with this exact coffee shop scenario.
Watch the segment from the coffee shop example. Notice how the variable Q is introduced to represent the unknown number of coffees. The resulting expression, 2 * Q, is a general formula for the profit.
This simple expression, , is powerful. It's not just an answer; it's a rule that connects the number of coffees sold to the total profit. If they sell 10 coffees (), the profit is dollars. If they sell 50 coffees (), the profit is dollars. The variable allows us to capture this relationship in a compact way.
The Rules of Using Variables
Now that we have a feel for what variables are, it's important to understand a few simple rules about how they behave. These rules ensure that our mathematical language is clear and unambiguous.
Algebra Basics: What Is Algebra? - Math Antics
The video "Algebra Basics: What Is Algebra?" from Math Antics gives a fantastic explanation of the most important rule for variables.
Please watch the segment from explaining the rules. The key takeaway is about what it means when you see the same letter multiple times in one equation.
Let's quickly summarize the key rules discussed in the video:
- Within one equation, the same variable always represents the same value. In the equation , both instances of must stand for the same number (in this case, 5). You can't have one be 4 and the other be 6.
- Different variables can represent different values. In the equation , and can be different. If is 3, then is 7.
- A variable can represent different values in different problems. The variable might be 5 in the equation , but it could be 20 in a different problem, like calculating profit.
These rules provide the basic grammar for algebra, allowing us to build complex ideas from these simple placeholders.
Conclusion
In this introductory lesson, we've established the foundational concept of a variable. This is the first and most crucial step on your path to understanding linear algebra and its role in AI.
Here are the key takeaways:
- A variable is essentially a placeholder or a slot for a number.
- We use variables to represent quantities that are unknown or that can change depending on the situation.
- This allows us to move from arithmetic (working with known numbers) to algebra (working with relationships and general rules).
- A simple set of rules governs their use, ensuring that our mathematical statements are consistent and clear.
In our next lesson, we will build directly on this foundation. Now that we know how to write an expression containing a variable, like , we will learn how to evaluate it by substituting a specific numerical value for the variable. This will be our first step into performing algebraic calculations.