In short

A small handful of rules govern everything you do with +, -, \times, and \div. Some operations let you swap the order of the inputs; some don't. Some let you regroup; some don't. Some always land back inside the set you started from; some escape it. Together, this bundle — closure, commutativity, associativity, distributivity, identity, inverse, the BODMAS rule for reading expressions, and the do-the-same-to-both-sides rules for equations and inequalities — is the entire grammar of school arithmetic. Once you can name a rule, you can use it on purpose.

Take three numbers and add them: 2 + 3 + 4. You can compute (2 + 3) + 4 = 5 + 4 = 9. Or you can compute 2 + (3 + 4) = 2 + 7 = 9. Same answer either way.

Now do the same with subtraction: 2 - 3 - 4. Compute (2 - 3) - 4 = -1 - 4 = -5. Now compute 2 - (3 - 4) = 2 - (-1) = 3.

The two ways of grouping give different answers — five units apart. With addition you could regroup freely; with subtraction you cannot. This isn't a quirk of those particular numbers. It is something about subtraction itself — a property addition has and subtraction does not.

Arithmetic looks like one thing from the outside ("the four operations"), but the four are not interchangeable. They follow different rules, and the differences are not optional. This article is the operating manual: a tour of the rules each operation does and does not obey, plus the rules that govern equations and inequalities. Once you know which rule is which, school algebra stops feeling like memorisation. Solving an equation becomes "apply rules in the right order until x is alone" — and you stop guessing.

Closure: does the answer even live in the set?

Before any of the famous rules — commutative, associative, distributive — there is one so basic it usually goes unsaid. When you write 3 + 4 = 7, three things have to be true at once. You need a set of numbers you are allowed to use. You need an operation you are allowed to apply to two of them. And the answer has to land back inside the set. If the answer escapes the set, the operation didn't really work on it — you stepped outside.

That third condition has a name.

Closure

A set S is closed under an operation \star if, for every pair of elements a, b in S, the result a \star b is also in S. If even one pair gives an answer outside S, the set is not closed under \star.

You met this idea informally in Number Systems. Each new layer of the number system was forced into existence by an operation that escaped the previous layer. Subtraction escapes the natural numbers: 3 - 5 is not in \mathbb{N}. Division escapes the integers: 7 \div 4 is not in \mathbb{Z}. Closure is the formal name for what was happening every time. Each time the old set wasn't closed under an operation you needed, you built a bigger one.

Here is the full picture for the four arithmetic operations and the four nested number systems.

Nested number systems showing where each operation escapesFour nested rounded rectangles representing the natural numbers inside the integers inside the rationals inside the real numbers. Each band contains example numbers and a label naming what new kind of element that band contains. Subtraction takes you out of the naturals into the integers. Division takes you out of the integers into the rationals. Roots and limits take you out of the rationals into the reals.1 5 42 1729−7 −1 01/2 −3/4 22/7√2 π ecounting numberssubtraction lives heredivision lives hereroots and limits live here
Each band of the number system was added to fix a closure failure in the band inside it. The naturals can add and multiply forever, but cannot subtract freely — so the integers were added. The integers cannot divide cleanly — so the rationals were added. And the rationals leave gaps that things like $\sqrt{2}$ slip through — so the reals were added. By the time you reach $\mathbb{R}$, all four basic operations are closed (with the single exception that you cannot divide by $0$).

This is also why "\div 0" is undefined and not just inconvenient. There is no real number x such that 0 \cdot x = 7 — every x gives 0. So 7 / 0 has no answer to point to, and closure under division survives only after you carve out the single forbidden divisor. The reals are closed under division by anything except zero. That tiny exception is the only crack in the whole tower.

The structural rules

Closure asks whether an operation makes sense at all. The next rules ask how it behaves. There are exactly three structural rules that matter for + and \times, and almost every algebraic move you ever make is one of them.

Commutative — order doesn't matter

For addition and multiplication of real numbers,

a + b = b + a \qquad a \times b = b \times a

You can swap the two inputs and get the same answer. 3 + 7 = 7 + 3 = 10. 4 \times 5 = 5 \times 4 = 20.

Subtraction and division do not commute. 5 - 3 = 2 but 3 - 5 = -2. 8 \div 2 = 4 but 2 \div 8 = 0.25. The order matters, and swapping it gives the wrong answer.

Associative — grouping doesn't matter

For addition and multiplication,

(a + b) + c = a + (b + c) \qquad (a \times b) \times c = a \times (b \times c)

You can move the brackets around and get the same answer. This is the rule that lets you write 2 + 3 + 4 without any brackets at all — the answer is 9 no matter how you group the terms. Same for 2 \times 3 \times 4 = 24.

Subtraction and division break this rule. The opening hook of this article was the failure of subtraction: (2 - 3) - 4 = -5 but 2 - (3 - 4) = 3. Division breaks it the same way: (8 \div 4) \div 2 = 1 but 8 \div (4 \div 2) = 4. With - and \div, brackets aren't optional decoration — they change the answer.

Distributive — multiplication spreads across addition

This one connects multiplication and addition. For all real numbers,

a \times (b + c) = a \times b + a \times c

You can multiply a into a bracketed sum by spreading it across the terms. This is the engine of expanding brackets in algebra: 3(x + 2) = 3x + 6. It is also the rule you use in reverse when you factor: 5x + 5y = 5(x + y).

Distributivity is not just a notational trick — it has a geometric meaning. If you draw a rectangle of height a and total width b + c, you can split it into two smaller rectangles of widths b and c, both with the same height a. The big rectangle's area is a(b + c). The two pieces' areas are ab and ac. Both descriptions have to give the same number, because they describe the same rectangle.

Geometric proof of the distributive law as rectangle areasA rectangle of height a and width b plus c, divided by a vertical line into two smaller rectangles. The left piece has width b and area a times b. The right piece has width c and area a times c. The whole rectangle has area a times the quantity b plus c, which must equal the sum of the two pieces.a × ba × cbcab + ca (b + c) = a × b + a × c
The distributive law as a picture. The big rectangle has height $a$ and width $b + c$, so its area is $a(b + c)$. Cut along the dashed line and the two pieces have areas $a \times b$ and $a \times c$. The total area of the pieces equals the area of the whole, so $a(b + c) = ab + ac$. The picture is the proof.

A small caution: distributivity only goes one way. Multiplication distributes over addition, but addition does not distribute over multiplication. 2 + (3 \times 4) = 2 + 12 = 14, but (2 + 3) \times (2 + 4) = 5 \times 6 = 30. Not the same. The distributive rule names a specific direction, and reading it backwards gives nonsense.

Identity and inverse

Two more rules close out the structural picture for addition and multiplication. They name special numbers.

The additive identity is 0. It is the unique number with the property that

a + 0 = a

for every a. Adding zero changes nothing. The multiplicative identity is 1, with the property

a \times 1 = a

for every a. Multiplying by one changes nothing.

Each operation also has an inverse for every input. The additive inverse of a is -a, the number that adds to a to give the identity:

a + (-a) = 0

The multiplicative inverse of a (when a \neq 0) is 1/a, the number that multiplies with a to give the identity:

a \times \tfrac{1}{a} = 1

These are the rules that let you "undo" things. Subtracting is just adding the additive inverse: 5 - 3 is 5 + (-3). Dividing is just multiplying by the multiplicative inverse: 5 \div 3 is 5 \times \tfrac{1}{3}. So the four operations are really two operations — addition and multiplication — paired with the inverse-of operation that turns one into the other. The reason 0 has no multiplicative inverse is that there is no number x with 0 \cdot x = 1, and that single missing inverse is exactly what makes division by 0 undefined.

Reading expressions: BODMAS and PEMDAS

When you write an expression that mixes more than one operation, you need a rule for which operation to do first. Take 2 + 3 \times 4. Without a rule, this could be (2 + 3) \times 4 = 20 or 2 + (3 \times 4) = 14 — two valid answers, depending on which order you reach for. To make written arithmetic unambiguous, mathematicians agreed on a single convention: multiplication binds tighter than addition, so 2 + 3 \times 4 means 2 + 12 = 14, not 5 \times 4 = 20.

The convention has a name. In Indian and British schools you learn it as BODMAS:

American schools say PEMDAS (Parentheses, Exponents, Multiplication, Division, Addition, Subtraction). The two are the same rule with different names — both put brackets first, then exponents, then multiplication-and-division as a tied pair, then addition-and-subtraction as a tied pair. There is no real difference between the Indian and the American convention; only the acronym changed when the rule crossed an ocean.

Two refinements catch almost everyone the first time:

It is worth being precise about what kind of rule this is. BODMAS is a convention, not a theorem. Nothing in the structure of the real numbers forces multiplication to come before addition; mathematicians simply chose this rule so everyone reads the same expression the same way. The rule exists because notation about numbers needs to be unambiguous, the same way punctuation exists so sentences can be unambiguous. If you put enough brackets in by hand, you can write any expression with no ambiguity at all and BODMAS becomes unnecessary — the convention is a labour-saving agreement, not a property of arithmetic.

Here is what reading a real expression looks like, step by step.

Step-by-step BODMAS reduction of an expression with brackets exponent multiplication division and additionThe expression twenty-four divided by four plus two times the quantity five minus three squared is reduced over five lines. The first line shows the original expression. Each subsequent line has the next BODMAS step labelled on the right: brackets first, then the exponent, then division and multiplication left to right, then addition. The final line gives the answer fourteen.24 ÷ 4 + 2 × (5 − 3)²start24 ÷ 4 + 2 × 2²brackets24 ÷ 4 + 2 × 4order (exponent)6 + 8÷ and × (left to right)
The expression $24 \div 4 + 2 \times (5 - 3)^2$ reduces to $14$ in four BODMAS steps. The bracket goes first ($5 - 3 = 2$), then the exponent ($2^2 = 4$), then the division and multiplication on the same level left-to-right ($24 \div 4 = 6$ and $2 \times 4 = 8$), and finally the single addition ($6 + 8 = 14$). Each step replaces a sub-expression with its value while leaving the rest of the expression untouched.

Equality and inequality

Rules so far have been about operations on numbers. Now look at relations between numbers — when one number equals another, or when one is bigger than another. Equations and inequalities each have their own rules, and the rules for inequalities have one famous trap.

Equality

The relation = obeys three properties that look obvious until you try to do without them.

These three together let you treat equations as objects you can manipulate. The single most useful rule that follows is the do-the-same-thing-to-both-sides principle: if a = b, then for any operation \star and any value c,

a \star c = b \star c

You can add the same number to both sides, subtract the same, multiply both by the same, or (when the value isn't zero) divide both by the same. The equality survives. This is the only move you ever make when solving an equation.

Inequality

The relations <, \le, >, \ge have most of the same flexibility, but they break in one place that catches almost everyone.

If a < b, you can:

That last rule is the trap. If you forget to flip, you get the wrong half of the number line as your answer. The reason it happens is geometric: multiplying by a negative number reflects the number line around zero. If a was to the left of b before the reflection, it is to the right of b after. The strict ordering reverses.

Why multiplying an inequality by a negative number flips itTwo parallel number lines stacked vertically. The top line shows two marked points at 2 and 5, with 2 to the left of 5, illustrating the inequality 2 is less than 5. The bottom line shows the same two values multiplied by negative 1, which puts negative 5 on the left and negative 2 on the right, so now negative 5 is less than negative 2 — the order has reversed. A vertical dashed arrow connects each pair, showing the reflection across zero.0252 < 50−5−2−5 < −2
On the top line, $2$ sits to the left of $5$, so $2 < 5$. Multiply both numbers by $-1$ and they land at $-2$ and $-5$ on the bottom line — but now $-5$ is to the left of $-2$, so $-5 < -2$. The strict order has reversed. Multiplying both sides of an inequality by a negative number reflects the line around zero, which swaps left and right. That is the geometric reason for the flip.

The modulus of a sum and a difference

The modulus (or absolute value) of a real number a, written |a|, is its distance from zero on the number line — always positive, regardless of which side of zero a sits on. So |3| = 3 and |-3| = 3 and |0| = 0.

When you combine two numbers and then take the modulus, two clean rules show up.

The first is the triangle inequality:

|a + b| \le |a| + |b|

The modulus of a sum is always at most the sum of the moduli. Equality happens exactly when a and b have the same sign (or one of them is zero). If they have opposite signs, they partly cancel each other out before you take the modulus, and |a + b| comes out smaller than |a| + |b|.

Try a quick numerical test. Take a = 3 and b = 5. Same sign. Then |a + b| = |8| = 8 and |a| + |b| = 3 + 5 = 8. Equal. Now take a = 3 and b = -5. Opposite signs. Then |a + b| = |-2| = 2 and |a| + |b| = 3 + 5 = 8. The sum on the left is much smaller. The cancellation showed up exactly because the signs disagreed.

You can feel this directly in the figure below. Drag the two red points anywhere on the line. The two readouts at the top show |a| + |b| and |a + b| as you move. When the points are on the same side of zero, the two values are equal. When they cross to opposite sides, |a + b| falls below |a| + |b|, and the gap between them is exactly the cancellation.

Interactive triangle inequality on the number lineAn interactive number line from negative ten to ten with two draggable red points labelled a and b. Above the line, a panel shows four live readouts: the value of a, the value of b, the sum of their absolute values, and the absolute value of their sum. As the reader drags the points, the bottom two readouts update — they are equal when both points are on the same side of zero and diverge when the points are on opposite sides.−10−50510↔ drag either red point
Drag the two red points along the line. The top two readouts show their values $a$ and $b$. The bottom two show $|a| + |b|$ and $|a + b|$. With both points on the same side of zero, the two bottom numbers stay equal. The moment you drag one across to the other side, the right number drops below the left — the cancellation shows up immediately, and the gap between the two readouts is exactly $|a + b| - (|a| + |b|)$ in absolute terms.

The companion rule is the reverse triangle inequality:

|a - b| \ge \big| |a| - |b| \big|

The modulus of a difference is always at least the difference between the moduli. The proof is short and worth seeing. Write a = (a - b) + b. Apply the triangle inequality to the right-hand side: |a| \le |a - b| + |b|, which rearranges to |a| - |b| \le |a - b|. Now run the same argument with a and b swapped to get |b| - |a| \le |b - a| = |a - b|. The two together say that |a - b| is at least as large as both |a| - |b| and |b| - |a| — which is exactly the statement that |a - b| \ge \big| |a| - |b| \big|.

These two rules will reappear constantly later: in trigonometric identities, in geometry on the plane (where they really do describe a triangle), in proofs about limits and continuity, and in any chapter of physics that involves displacement.

Two worked examples

The properties become useful the moment you start solving things. Both examples below name each property as it gets used, so you can see the structure of the moves.

Example 1: Solve $5(x + 2) = 35$

This equation has brackets, so the first job is to get rid of them. Then the rest is two clean uses of the do-the-same-thing-to-both-sides rule.

Step 1. Distribute the 5 across the bracketed sum.

5(x + 2) = 5x + 10

So the equation becomes 5x + 10 = 35.

Why: the distributive law lets you turn 5 \times (x + 2) into 5x + 10. After this move, x is no longer trapped inside a bracket, and you can start isolating it.

Step 2. Subtract 10 from both sides — equivalently, add the additive inverse of 10 to both sides.

5x + 10 - 10 = 35 - 10
5x = 25

Why: subtracting 10 from the left clears the constant term, leaving only the 5x behind. The equality survives because you did the same thing to both sides — that is the rule for equations. On the right, 35 - 10 = 25.

Step 3. Divide both sides by 5 — equivalently, multiply both sides by the multiplicative inverse of 5.

\frac{5x}{5} = \frac{25}{5}
x = 5

Why: dividing the left side by 5 cancels the coefficient and leaves x alone. Dividing the right side by 5 gives 5. You are allowed to divide by 5 because 5 \neq 0 — the multiplicative inverse exists.

Result. x = 5.

Solving 5 times the quantity x plus 2 equals 35 in three stepsA vertical sequence of four equation boxes connected by labelled arrows. The first box contains the original equation five times the quantity x plus two equals thirty-five. An arrow labelled distributive law leads to a second box containing five x plus ten equals thirty-five. An arrow labelled subtract ten from both sides leads to a box containing five x equals twenty-five. A final arrow labelled divide both sides by five leads to the answer x equals five.5(x + 2) = 35distributive law5x + 10 = 35subtract 10 from both sides5x = 25divide both sides by 5x = 5
Three rules, applied in order, take the equation from its bracketed form to the answer. Each arrow names the property that is doing the work in that step. The whole solution is structural — once you see which rule each step uses, the algebra is no longer guesswork.

You can check the answer by plugging x = 5 back into the original equation: 5(5 + 2) = 5 \times 7 = 35. The equality holds, so the solution is correct.

Example 2: Solve the inequality $-3x + 4 \ge 13$

This one looks like the previous example but introduces the inequality flip. Watch for the moment it triggers.

Step 1. Subtract 4 from both sides.

-3x + 4 - 4 \ge 13 - 4
-3x \ge 9

Why: the same rule as for equations — adding or subtracting the same number on both sides preserves an inequality, and the direction of the inequality stays the same. So \ge remains \ge.

Step 2. Divide both sides by -3. The inequality flips.

\frac{-3x}{-3} \le \frac{9}{-3}
x \le -3

Why: this is the trap. You divided both sides by a negative number, which reflects the number line around zero. The relative order of the two sides reverses, so \ge becomes \le. If you had forgotten to flip, you would have written x \ge -3, which is the wrong half of the number line — the answer would be off by an entire infinite ray.

Result. Every x \le -3 satisfies the original inequality.

Solution region x less than or equal to negative three on the number lineA horizontal number line from negative seven to three with integer tick marks. The portion of the line from negative seven leftward to negative three is drawn as a thick red ray ending in a filled red circle at negative three, showing that the solution to the inequality is every real number less than or equal to negative three. An arrow at the left end of the ray indicates that it continues to negative infinity. The inequality x is less than or equal to negative three is labelled above the line.−7−6−5−4−3−2−10123x ≤ −3
The solution to $-3x + 4 \ge 13$ is every real number from $-3$ leftward, including $-3$ itself. The filled circle at $-3$ marks the closed boundary (because the inequality is non-strict), and the arrow at the far left says the ray extends forever to negative infinity. If you had skipped the flip in Step 2, you would have shaded the *other* half of the line — the entire wrong infinite set.

Common confusions

A few traps that catch almost everyone the first time.

Going deeper

If you came here just to learn the rules and how to spot them in a working equation, you have it — you can stop here. The rest of this section is for readers who want to see how these properties fit into a bigger structure, and where the same names show up later.

These rules have a name as a package

The bundle of properties you just met — closure, associativity, identity, inverse, commutativity, plus the distributive law that ties two operations together — is the definition of an algebraic object called a field. The real numbers \mathbb{R} form a field. The rationals \mathbb{Q} also form a field. The integers \mathbb{Z} are almost a field but fail one rule: not every integer has a multiplicative inverse inside \mathbb{Z} (the inverse of 5 is 1/5, which is not an integer). \mathbb{Z} is what algebraists call a ring instead.

The point of giving the package a name is that the same properties show up far away from arithmetic. Polynomials can be added and multiplied and obey all the field rules except inverse — they form a ring. Square matrices can be added and multiplied, but multiplication is not commutative (AB generally is not BA) — they form yet another structure. Once you know which rules an object obeys and which it doesn't, you know exactly what you are allowed to do with it. Almost all of higher algebra is the study of "what survives when one of these rules is dropped."

Closure failure is the engine of mathematical extension

Every layer of the number system in Number Systems was a closure patch: subtraction broke \mathbb{N}, division broke \mathbb{Z}, the existence of \sqrt{2} broke \mathbb{Q}. The same mechanism works one level higher. The square root of a negative number breaks \mathbb{R} — there is no real x with x^2 = -1 — and the patch is to invent a new number i with i^2 = -1, which gives the complex numbers \mathbb{C}. Same pattern, one layer up. Every time mathematicians have run into an operation that escapes its set, they have built a bigger set rather than declared the operation forbidden.

The triangle inequality is geometric

On the real line, |a + b| \le |a| + |b| might look like a curiosity. It becomes vivid in two dimensions. If a and b are vectors in the plane, then |a + b| is the length of the diagonal of a parallelogram, and |a| + |b| is the length of two sides of the parallelogram laid end to end. The inequality is now literally the statement that a triangle's third side is shorter than the sum of the other two — the rule that gives the triangle inequality its name. The 1D version you met above is the same rule with the parallelogram squashed flat onto a line.

This is one of the most far-reaching inequalities in mathematics. It is the foundation of any notion of distance, in any setting — from coordinate geometry, to function spaces, to the analysis of error in numerical methods. The same six symbols pin down the meaning of "how far apart" in every one of those contexts.

Where this leads next

The properties on this page are the operating manual for everything that follows.