This site is a work in progress. New lessons are added regularly. Contact us

Defining New Operations

Learning goals

  • Evaluate a new symbol by substituting into its defining rule
  • Drop a whole expression into a slot as one block
  • Test whether the operation is commutative, since most are not
  • Work nested operations from the innermost outward
  • Look for an identity by solving both sides of the condition
  • Turn an equation with the symbol into an ordinary one

A made-up symbol is only a rule

A binary operation takes two inputs and produces one output, exactly the way ++ takes 33 and 44 and hands back 77. The operations you grew up with, ++, -, ×\times, and ÷\div, are the familiar four. But nothing stops someone from inventing another one and naming it with a fresh symbol. When a problem writes

ab=2a+b1,a \star b = 2a + b - 1,

it is doing just that. The star is a made-up name, and the right-hand side is the rule that says what to do with the two inputs aa and bb. Think of aa and bb as two empty slots. To compute a particular value like 353 \star 5, drop the first input into every aa and the second input into every bb, then simplify:

35=2(3)+51=6+51=10.3 \star 5 = 2(3) + 5 - 1 = 6 + 5 - 1 = 10.

That is the whole method, and it never changes: substitute the inputs into the defining rule, then evaluate with the ordinary order of operations. The order of operations matters as much here as anywhere. In 2a+b12a + b - 1 the multiplication 2a2a happens before the additions, so 2(3)2(3) becomes 66 before anything is added. Skip that and you would get a different, wrong answer. The star is new; the arithmetic inside it is not.

The operation a star b as a two-input machine turning 3 and 5 into 10Inputs a equals 3 and b equals 5 enter the rule 2a plus b minus 1, which evaluates to 10.inputsa = 3b = 5the rule2a + b - 12(3) + 5 - 1output10
A defined operation is a two-input machine. Feed the first input into every a and the second into every b, run the rule, and read off the single output. Computing 3 star 5 just means substituting a = 3 and b = 5 into 2a + b - 1.

Worked example 1 Evaluating a custom operation, including negatives

Let ab=2a+b1a \star b = 2a + b - 1. Compute 474 \star 7, then (2)5(-2) \star 5, then 6(3)6 \star (-3).

For 474 \star 7, substitute a=4a = 4 and b=7b = 7, and do the multiplication first:

47=2(4)+71=8+71=14.4 \star 7 = 2(4) + 7 - 1 = 8 + 7 - 1 = 14.

For (2)5(-2) \star 5, the first input is negative, so 2a2a becomes 2(2)=42(-2) = -4. Keep track of the sign:

(2)5=2(2)+51=4+51=0.(-2) \star 5 = 2(-2) + 5 - 1 = -4 + 5 - 1 = 0.

For 6(3)6 \star (-3), the second input is negative, and it lands in the +b+b slot, so you add a negative:

6(3)=2(6)+(3)1=1231=8.6 \star (-3) = 2(6) + (-3) - 1 = 12 - 3 - 1 = 8.

Each answer came from the same two moves: put the inputs in their slots, then simplify. The negatives needed care only because signs always need care, not because the star does anything unusual.

Check your understanding

A new operation is defined by ab=3aba \triangle b = 3a - b. What is 454 \triangle 5?

Answer choices

When an input is an expression

Nothing says the inputs have to be numbers. A slot can hold a whole expression, and the rule still works the same way: whatever sits in the slot gets substituted in one piece. This is the exact substitution you used to build composite functions last lesson, where the entire rule for g(x)g(x) dropped into ff. Watch the order of operations especially closely when an input is squared or wrapped in parentheses.

Worked example 2 Substituting an expression into a slot

Let ab=a2ba \diamond b = a^2 - b. Compute 525 \diamond 2 and (4)3(-4) \diamond 3, then simplify (k+1)4(k + 1) \diamond 4.

For 525 \diamond 2, square the first input before subtracting the second:

52=522=252=23.5 \diamond 2 = 5^2 - 2 = 25 - 2 = 23.

For (4)3(-4) \diamond 3, the first input is negative, and squaring a negative gives a positive:

(4)3=(4)23=163=13.(-4) \diamond 3 = (-4)^2 - 3 = 16 - 3 = 13.

Now let the first input be the expression k+1k + 1. It goes into the a2a^2 slot as a single block, so the whole thing gets squared:

(k+1)4=(k+1)24=(k2+2k+1)4=k2+2k3.(k + 1) \diamond 4 = (k + 1)^2 - 4 = (k^2 + 2k + 1) - 4 = k^2 + 2k - 3.

The square applies to all of k+1k + 1, not just the kk, which is why the middle term 2k2k appears. Treat the slot as a container: the entire input drops in, then you simplify.

The order of the two inputs usually matters

Ordinary addition does not care about order, since 3+53 + 5 and 5+35 + 3 are both 88. It is tempting to assume every operation is that polite, but most invented ones are not. Test the star on the two orders of 33 and 55:

35=2(3)+51=10,53=2(5)+31=12.3 \star 5 = 2(3) + 5 - 1 = 10, \qquad 5 \star 3 = 2(5) + 3 - 1 = 12.

Same two numbers, but 1010 and 1212 are different, so 35533 \star 5 \ne 5 \star 3. The reason is built into the rule. The definition 2a+b12a + b - 1 doubles the first input but not the second, so the two slots are treated differently. Swap the inputs and the one that gets doubled changes, which changes the answer. An operation where the order of the inputs can change the result is called not commutative.

You met exactly this warning back when you studied composition earlier in this chapter. Composition was not commutative either, because the outer function acted last and decided the kind of answer. A custom operation carries the same caution for a related reason: whenever the rule handles its two slots differently, reversing the inputs reshuffles the work.

Swapping the inputs of a star b changes the output from 10 to 12Left card: a equals 3, b equals 5 gives 10. Right card: a equals 5, b equals 3 gives 12.the rule is 2a + b - 1a = 3, b = 52(3) + 5 - 1= 10a = 5, b = 32(5) + 3 - 1= 12Same rule, swapped inputs, so the answers differ (10 is not 12).
The same rule with its two inputs swapped. Because 2a + b - 1 doubles the first input only, sending 3 and 5 through in one order gives 10, and in the other order gives 12. The two results differ, so the order of the inputs matters.

Because most operations are not commutative, commutativity is a property to check, never to assume. Some invented operations really are commutative, and the only way to be sure is to test the two orders or to argue from the rule itself. Here is one that passes.

Worked example 3 One operation that is not commutative, and one that is

Compare the two orders for two different rules.

First take the star, ab=2a+b1a \star b = 2a + b - 1. Its two orders on the inputs 33 and 55 gave 1010 and 1212, so it is not commutative. One counterexample is enough to settle that.

Now take a different rule, ab=a+b+aba \oplus b = a + b + ab, and test it on 22 and 77:

27=2+7+(2)(7)=2+7+14=23,2 \oplus 7 = 2 + 7 + (2)(7) = 2 + 7 + 14 = 23,72=7+2+(7)(2)=7+2+14=23.7 \oplus 2 = 7 + 2 + (7)(2) = 7 + 2 + 14 = 23.

This time the two orders agree. A single matching pair is only a hint, not a proof. But the match is no accident, and the next result shows why \oplus is commutative for every choice of inputs.

The operation ab=a+b+aba \oplus b = a + b + ab is commutative#

To show \oplus is commutative, we must show ab=baa \oplus b = b \oplus a for every pair of numbers aa and bb, not just for one lucky example. Start from the definition applied in each order:

ab=a+b+ab,ba=b+a+ba.a \oplus b = a + b + ab, \qquad b \oplus a = b + a + ba.

Now compare the two right-hand sides using facts you already know about ordinary numbers. Addition of numbers is commutative, so b+ab + a is the same as a+ba + b. Multiplication of numbers is commutative too, so baba is the same as abab. Replacing each piece of bab \oplus a with its equal turns it into

ba=a+b+ab,b \oplus a = a + b + ab,

which is exactly the expression for aba \oplus b. Since the two are identical for every aa and bb, the operation \oplus is commutative. Notice what did the work: the new operation inherits its symmetry straight from the symmetry of the ++ and ×\times hiding inside its rule. A rule built symmetrically in its two inputs stays the same when they trade places.

Check your understanding

For the operation ab=a2ba \diamond b = a^2 - b, which statement is true?

Answer choices

Nested operations: work from the inside out

Once you can combine two inputs, you can combine three by applying the operation twice. The catch is that the two inputs of the second step must themselves be single values, so a three-input expression needs parentheses to say which pair goes first. Face a grouped expression the same way you face nested parentheses in arithmetic or an inside-out composition. Evaluate the innermost parentheses first, turn that result into a single number, then apply the operation again.

Watch what the grouping does to the answer.

Worked example 4 Two groupings, two different answers

Let ab=2a+b1a \star b = 2a + b - 1. Compute (12)3(1 \star 2) \star 3 and 1(23)1 \star (2 \star 3).

For (12)3(1 \star 2) \star 3, the parentheses on the left go first. Evaluate the inner star, then use its result as the first input of the outer star:

12=2(1)+21=3,33=2(3)+31=8.1 \star 2 = 2(1) + 2 - 1 = 3, \qquad 3 \star 3 = 2(3) + 3 - 1 = 8.

So (12)3=8(1 \star 2) \star 3 = 8. Now regroup to the right. This time the inner star on 22 and 33 goes first, and its result becomes the second input of the outer star:

23=2(2)+31=6,16=2(1)+61=7.2 \star 3 = 2(2) + 3 - 1 = 6, \qquad 1 \star 6 = 2(1) + 6 - 1 = 7.

So 1(23)=71 \star (2 \star 3) = 7. The two groupings give 88 and 77, which are not equal.

The two answers disagreeing tells you something important. An operation is called associative when the grouping never matters, the way (2+3)+4(2 + 3) + 4 and 2+(3+4)2 + (3 + 4) are both 99. The star fails that test, since (12)3=8(1 \star 2) \star 3 = 8 but 1(23)=71 \star (2 \star 3) = 7, so the star is not associative. Just like commutativity, associativity is a property to check rather than assume, and when it fails the parentheses are not optional. Without them, "1231 \star 2 \star 3" would be ambiguous, because the two readings genuinely produce different values.

Looking for an identity element

Ordinary addition has a special number, 00, that changes nothing: a+0=aa + 0 = a for every aa. Ordinary multiplication has 11, since a×1=aa \times 1 = a. A value that leaves every input untouched from both sides is called an identity element for the operation. Untouched from both sides means the value gives back aa whether it is combined on the left or the right of aa. Requiring both sides matters here, because these operations need not be commutative, so leaving an input unchanged from one side alone is not enough. It is natural to ask whether an invented operation has such a value, and the question is answered by solving an equation.

Worked example 5 Finding an identity element

Does ab=a+b+aba \oplus b = a + b + ab have an identity element? If so, find it.

An identity is a fixed value ee that leaves every input unchanged from both sides, meaning ae=aa \oplus e = a and ea=ae \oplus a = a no matter what aa is. Start with the first condition, writing it out with the rule and solving for ee:

ae=a+e+ae=a.a \oplus e = a + e + ae = a.

Subtract aa from both sides to isolate the terms with ee:

e+ae=0e(1+a)=0.e + ae = 0 \quad\Longrightarrow\quad e(1 + a) = 0.

For this to hold for every aa, the factor ee itself must be 00, since 1+a1 + a is not always zero. So the only candidate is e=0e = 0. Now check that it works from both sides:

a0=a+0+a0=a,0a=0+a+0a=a.a \oplus 0 = a + 0 + a\cdot 0 = a, \qquad 0 \oplus a = 0 + a + 0\cdot a = a.

Both orders return aa, which they must here, since \oplus is commutative. The identity element of \oplus is 00. Not every operation is so lucky. For the star, the condition ae=2a+e1=aa \star e = 2a + e - 1 = a already forces e=1ae = 1 - a, a value that depends on aa, so no single number leaves every input unchanged even from that one side. With nothing able to satisfy the condition, the star has no identity element. Whether an identity exists is one more property you discover by testing, not by assuming.

Solving an equation that hides a custom operation

Because a defined operation is only a rule, an equation that contains one is only an ordinary equation in disguise. Substitute the definition to strip the invented symbol away, and you are left with the linear or simple quadratic equations you already solve. The unknown can sit in either slot.

Worked example 6 Solving for an unknown input

Let ab=2a+b1a \star b = 2a + b - 1. Solve x4=11x \star 4 = 11, then 3x=103 \star x = 10. Finally, with ab=a2ba \diamond b = a^2 - b, solve x3=22x \diamond 3 = 22.

For x4=11x \star 4 = 11, substitute a=xa = x and b=4b = 4 into the rule to turn the starred equation into a plain one:

2x+41=112x+3=112x=8x=4.2x + 4 - 1 = 11 \quad\Longrightarrow\quad 2x + 3 = 11 \quad\Longrightarrow\quad 2x = 8 \quad\Longrightarrow\quad x = 4.

For 3x=103 \star x = 10, the unknown is the second input, so substitute a=3a = 3 and b=xb = x:

2(3)+x1=10x+5=10x=5.2(3) + x - 1 = 10 \quad\Longrightarrow\quad x + 5 = 10 \quad\Longrightarrow\quad x = 5.

For x3=22x \diamond 3 = 22, the rule squares the first input, so substituting gives a simple quadratic:

x23=22x2=25x=5  or  x=5.x^2 - 3 = 22 \quad\Longrightarrow\quad x^2 = 25 \quad\Longrightarrow\quad x = 5 \ \text{ or } \ x = -5.

Squaring produces two solutions, both valid, since 525^2 and (5)2(-5)^2 each equal 2525. In every case the starred or diamonded equation became an equation you have solved since your first algebra lesson, once the definition was substituted in.

Check your understanding

With ab=2a+b1a \star b = 2a + b - 1, solve x5=16x \star 5 = 16 for xx.

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Free Response Questions (FRQ)

Longer questions in parts, to be worked out on paper. Progressive hints, the answer on its own so you can check yourself and try again, then the full worked solution, plus a rubric to mark your own work against.

Free response Work it out on paper 5 questions Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (Optional)

Every operation symbol on this page was invented by somebody, and the famous ones started out looking just as strange as a star or a diamond.

The plus and minus marks first reached print in 1489, in a German arithmetic book by Johannes Widmann. They gave no instruction there. They labelled crates that held more or less than their stated weight, a surplus and a shortfall. Only later did other writers promote them into operations you carry out.

The equals sign is younger still. Robert Recorde was a Welsh physician who wrote the first algebra book in English. He introduced the sign in 1557. He chose two parallel lines, he explained, because no two things could be more equal. That is a reason offered and argued for, not a rule handed down from anywhere.

Neither mark is more natural than a star. A reader in 1489 had to be told what the new sign did. A contest problem today tells you that ab=2a+b1a \star b = 2a + b - 1 for exactly the same reason. The definition is the entire content of the symbol. The shape is only a label.

So when a fresh symbol turns up, do not hunt for a hidden meaning inside it. Read the rule written beside it, drop the two inputs into their slots, and simplify with the order of operations you already trust.