Skip to main content

Variables and Expressions

Learn what variables and algebraic expressions are, how to write them from word descriptions, and how to evaluate them by substituting values.

Lesson 2 of 11 Algebra & Equations Beginner ⏱ 7 min read
πŸ”₯ Why This Matters

Every spreadsheet formula, every software calculation, every financial model starts with a variable β€” a placeholder for a number that changes. When your phone app calculates your monthly payment or your boss asks you to build a budget model, you're writing and evaluating algebraic expressions. This is where all of math transitions from arithmetic (fixed numbers) to algebra (flexible relationships).

🎯 What You'll Learn
  • Define a variable and write an algebraic expression from a word description
  • Identify the parts of an expression: constants, variables, coefficients, and terms
  • Evaluate any expression by substituting a number for each variable
πŸ“– Key Vocabulary
VariableA letter (like x, n, or t) that represents an unknown or changing quantity. ConstantA fixed number in an expression that never changes β€” like the 5 in 3x + 5. CoefficientThe number multiplied by a variable β€” the 3 in 3x is the coefficient of x. TermA single number, variable, or product/quotient β€” separated by + or βˆ’. In 3x + 5, the terms are 3x and 5. ExpressionA combination of terms using operations β€” no equals sign. Example: 4n βˆ’ 7. EvaluateSubstitute a number for each variable and compute the result.
Key Concept

An algebraic expression is a mathematical phrase that contains at least one variable. Unlike an equation, it has no equals sign β€” it simply describes a quantity.

\[ \underbrace{3}_{\text{coefficient}} \underbrace{x}_{\text{variable}} + \underbrace{5}_{\text{constant}} \]

To evaluate an expression, replace each variable with a given number and simplify using the order of operations. If \(x = 4\): \(3(4) + 5 = 12 + 5 = 17\).

Anatomy of an Expression

Expression: 5xΒ² βˆ’ 3x + 8

Part Example What it is
Term 15xΒ²coefficient 5, variable x, exponent 2
Term 2βˆ’3xcoefficient βˆ’3, variable x
Term 38constant term (no variable)

3 terms total. The degree of the expression is 2 (highest exponent).

Worked Example 1 β€” Basic: Write an Expression

Write an algebraic expression for: "7 more than twice a number n."

  • "twice a number n" β†’ \(2n\)
  • "7 more than" β†’ add 7
\[ 2n + 7 \]

The expression is \(2n + 7\). It has two terms: the variable term \(2n\) and the constant \(7\).

Worked Example 2 β€” Intermediate: Evaluate an Expression

Evaluate \(4x^2 - 3x + 1\) when \(x = -2\).

  1. Substitute: \(4(-2)^2 - 3(-2) + 1\)
  2. Exponent first: \(4(4) - 3(-2) + 1\)
  3. Multiply: \(16 + 6 + 1\)
  4. Add: \(23\)
\[ 4(-2)^2 - 3(-2) + 1 = 16 + 6 + 1 = 23 \]

The expression evaluates to 23 when \(x = -2\).

Worked Example 3 β€” Real World: Monthly Phone Bill

A phone plan charges $25 per month plus $0.10 per text message. Write an expression for the monthly cost and evaluate it for 80 texts.

Expression: Let \(t\) = number of texts. Monthly cost = \(0.10t + 25\).

Evaluate at \(t = 80\):

\[ 0.10(80) + 25 = 8 + 25 = \$33 \]

The monthly bill for 80 texts is $33.

✏️ Quick Check

Test yourself before moving on:

  1. In \(6m - 4\), identify the coefficient, variable, and constant.
  2. Write an expression for: "the product of 5 and a number, decreased by 3."
  3. Evaluate \(3a + 2b\) when \(a = 4\) and \(b = -1\).
β–Ά Show Answers
  1. Coefficient: 6, Variable: m, Constant: βˆ’4.
  2. \(5n - 3\) (or any letter for "a number").
  3. \(3(4) + 2(-1) = 12 - 2 =\) 10.
⚠️ Common Mistakes
  • Confusing expressions and equations: An expression has no equals sign β€” it represents a value. An equation has an equals sign and can be solved. \(3x + 2\) is an expression; \(3x + 2 = 8\) is an equation.
  • Missing the negative sign on substitution: When substituting a negative number, always use parentheses: \(3(-2)^2\) not \(3-2^2\). The parentheses ensure the negative is handled correctly.
  • Coefficient of 1 is invisible: The expression \(x + 4\) has an implied coefficient of 1 on \(x\) β€” it means \(1x + 4\). Don't forget it when combining like terms later.
βœ… Key Takeaways
  • A variable is a letter representing an unknown β€” expressions describe relationships involving variables.
  • Terms are separated by + or βˆ’; each term is a product of a coefficient and variables.
  • To evaluate: substitute the given value(s) and simplify using order of operations.
  • Always use parentheses when substituting negative numbers to avoid sign errors.
πŸ’Ό Career Connection β€” Software Development & Data Science

Every line of code that calculates something is an algebraic expression in disguise. A developer writing totalCost = price * quantity + shippingFee is coding the expression \(c = pq + s\). Data scientists write expressions to transform datasets β€” normalizing a variable, applying a formula, building a prediction model. Variable fluency is the bridge between arithmetic and programming logic.

Calculator Connection

The PEMDAS / Order of Operations Calculator evaluates any expression step by step β€” great for checking your substitution work and confirming the order of operations was applied correctly.

Try it with the Calculator

Apply what you've learned with this tool.

PEMDAS / Order of Operations Calculator
Evaluate numerical expressions following the correct order of operations: Parentheses, Exponents, Multiplication/Division, and Addition/Subtraction.
Use calculator β†’
← Previous Lesson
Back to
Understanding Order of Operations
Continue Learning
Up Next: Order of Operations (PEMDAS) with Variables
Next Lesson →
Test Your Knowledge

Variables and Expressions - Quiz

5 questions per attempt  Β·  Beginner  Β·  Pass at 70%

Start Quiz β†’

More in Algebra & Equations

Understanding Order of Operations Order of Operations (PEMDAS) with Variables Combining Like Terms
← All Algebra & Equations lessons