One item costs 120 hypothetical currency units, and delivery adds another 40 per order. For three items we calculate 120 ⋅ 3 + 40 = 400. For five, 120 ⋅ 5 + 40 = 640. Almost the whole calculation repeats. Letters let us keep the rule and substitute numbers only when the data are known.

All we need here is familiarity with integers and fractions. Solving complicated equations can wait.

What each letter means

Let n denote the number of items, p the price per item, d the delivery fee and C the total cost. Then our formula is:

C = pn + d.

Writing pn means multiplying p ⋅ n. First find the cost of all the items, then add delivery once. The number n is a variable: different orders may contain 1, 3 or 5 items. A value of the variable is a chosen number, such as 3. The value of the whole expression when n = 3, p = 120, d = 40 is 400. OpenStax, §1.2 on variables, expressions and substitution.

For one tariff, p = 120 and d = 40 are fixed: they act as parameters of the model. We can change them when comparing another tariff. For example, with p = 80, d = 0, the same three items cost 240. The problem determines a letter’s role: p is not permanently a “constant” because of its name.

Fix the tariff: p = 120 (price per item); d = 40 (delivery per order).

n× 120+ 40→ C
Quantity n, itemsSubstitutionTotal C
1120 × 1 + 40160
3120 × 3 + 40400
5120 × 5 + 40640
One formula C = pn + d, three quantities. Price p = 120 and delivery d = 40 use hypothetical currency units; n is a positive integer.

Substitution preserves the order of operations

The expression pn + d is a set of operations we can evaluate after choosing values. The formula C = pn + d links quantities with an equality. Here 120 ⋅ 3 + 40 does not equal 120 ⋅ (3 + 40): those parentheses would tell us to multiply the delivery fee by the item price too.

When substituting a negative number, enclose it in parentheses. In a separate, purely numerical example, 2x + 5 at x = − 3 gives 2 ⋅ ( − 3) + 5 = − 1. That is a valid algebraic substitution, but −3 items are outside our purchasing model.

An equality may be conditional or an identity

The statement 120n + 40 = 400 is true for n = 3, but at n = 1 its left side equals 160. When we seek values for which an equality holds, we have an equation. Later we will learn to solve it systematically.

In contrast, p(n + 1) = pn + p is true for all real p,n. It is an identity: an equality that holds for all allowed values of its variables. It is an instance of the distributive law: to multiply a sum by a number, multiply each term and add the results. Properties of real-number operations, OpenStax §1.1.

In the purchasing model this is visible without formal manipulation: n + 1 identical items are n items plus one more, so p(n + 1) and pn + p describe the same item cost. The law also holds for negative numbers, though a literal count of goods no longer illustrates them. Several successful numerical checks do not prove an identity for every number; the law of arithmetic supplies the justification here.

A formula needs boundaries

For this purchase we take only integer n ≥ 1, nonnegative p and d, and matching currency units. We can arithmetically substitute n = 0 and get C = d, but that does not prove the shop charges for a nonexistent order. That case needs its own rule.

The formula also omits quantity discounts and free delivery above a threshold. If the conditions change, we need to change the model, rather than merely put a new number into the old expression.

Branch · Checking unitsThis extra formula check can be skipped without losing the main explanation.

Spotting an error before calculating

The price p has units of “currency units per item”, while the quantity n has units of “items”. In the product pn, items cancel, leaving currency units. Delivery d uses the same currency units, so we can add it.

The expression p + n would instead add a price per item to a count of items. Even if a calculator returns a number, it will lack the intended meaning. Consistent units help reject an error, but do not by themselves prove that every model assumption is correct.

A letter reserves a place for a number together with its meaning. To read a new formula, label every quantity and its units, state the allowed values and check one concrete case. Then pn + d becomes a short rule you can explain and verify.