Variables Example

A variable is a symbol that represents a number that may be unknown or may change. Algebra uses variables to express a rule once and apply it to many values, which is why formulas appear in science, measurement, and everyday calculations. Algebra has no single inventor: al-Khwarizmi helped establish systematic equation-solving in the ninth century, while François Viète later advanced letter-based symbolic algebra. This example substitutes given values into an expression and evaluates it carefully.

Evaluate 3x + 2y when x = 4 and y = 5

Replace each variable with its stated value. Keep the multiplication signs, then add the resulting terms.

3x+2yfor x=4, y=53x+2y\quad\text{for }x=4,\ y=5
Key facts used in this example
Expression3x + 2y
Value of x4
Value of y5
Evaluated value22

Step-by-step solution

  1. 1

    Write the substitution rule

    For an expression in x and y, replace x with 4 and y with 5 everywhere each variable occurs.

    3x+2y  ⟶  3(4)+2(5)3x+2y\;\longrightarrow\;3(4)+2(5)
  2. 2

    Multiply before adding

    Use the order of operations: evaluate each product before combining the terms.

    3(4)+2(5)=12+103(4)+2(5)=12+10
  3. 3

    Add the values

    The two evaluated terms sum to 22.

    12+10=2212+10=22

ANSWER

The expression evaluates to 22

When x = 4 and y = 5, the value of 3x + 2y is 22.

3(4)+2(5)=223(4)+2(5)=22

Check each term

The first term contributes 12 and the second contributes 10. Adding those contributions reproduces the result.

3x=12,2y=10,12+10=223x=12,\qquad2y=10,\qquad12+10=22