It seems that given a statement $a = b$, that $a + c = b + c$ is assumed also to be true.

Why isn't this an axiom of arithmetic, like the commutative law or associative law?

Or is it a consequence of some other axiom of arithmetic?


Edit: I understand the intuitive meaning of equality. Answers that stated that $a = b$ means they are the same number or object make sense but what I'm asking is if there is an explicit law of replacement that allows us to make this intuitive truth a valid mathematical deduction. For example is there an axiom of Peano's Axioms or some other axiomatic system that allows for adding or multiplying both sides of an equation by the same number?

In all the texts I've come across I've never seen an axiom that states if $a = b$ then $a + c = b + c$. I have however seen if $a < b$ then $a + c < b + c$. In my view $<$ and $=$ are similar so the absence of a definition for equality is strange.

  • 21
    $\begingroup$ It's not an axiom of arithmetic, but it is an axiom of logic. $\endgroup$
    – Git Gud
    Jan 11 '15 at 21:50
  • 10
    $\begingroup$ In book $I$ of Euclid's Elements right after the postulates (axioms) there are 5 "common notions" (in the version I have at least). One of these is actually "If equals be added to equals, the wholes are equal." I don't exactly know what is meant by "common notion" in this sense, but I thought it was interesting. $\endgroup$
    – Eff
    Jan 11 '15 at 21:58
  • $\begingroup$ For what I know, law is for the thing that govern the nature (e.g. Newton's laws), not for logical things like math. In math, we use theorem. $\endgroup$
    – Ooker
    Jan 12 '15 at 2:03
  • 2
    $\begingroup$ @Ooker: I don't think math uses "law" as much as the empirical sciences do, but "commutative law" is not much less common than "commutative property" (and used to be more common). And "law of sines" and "law of cosines" are far more common than any alternative name. $\endgroup$
    – ruakh
    Jan 12 '15 at 7:02
  • $\begingroup$ when trying to write a computer algebraic manipulator, you run into this issue of defining equality. so just think of blind algebraic manipulation. make = a binary operator just like + is: a=b, 2*(a=b), (2*a)=(2*b), ((2*a)/b) = ((2*b)/b), ((2*a)/b) = (2*(b/b)), ... every operation distributes over =, and = is commutative and associative. Division is not associative: ((a/b)/c)=(a/(b*c)). Subtraction is anti-commutative: (a-b) = -(b-a) $\endgroup$
    – Rob
    Jan 12 '15 at 19:54

If you are given that $$a = b$$ then you can always infer that $$f(a) = f(b)$$ for a function $f$. That's what it means to be a function. However, if you are given $$f(a) = f(b)$$ then you can't infer $$a = b$$ unless the function is injective (invertible) over a domain containing $a$ and $b$.

For your problem, $f(x) = x + c$.

  • 8
    $\begingroup$ This is what we mean when we say "$+$" is an "operation". That it is a function. And, as Daniel notes, functions have this property. When you define "$+$" somehow, then you should prove that it is an operation; this would be among the first things to do. Some texts may phrase this by saying "$+$" is well-definied. $\endgroup$
    – GEdgar
    Jan 12 '15 at 14:47
  • $\begingroup$ I am an engineer so I would say it in the exact opposite way: $a=b$ means that no matter what the function $f$ is $f(a)=f(b)$ $\endgroup$
    – hyportnex
    Jan 13 '15 at 15:54
  • $\begingroup$ @GEdgar I disagree slightly with this characterization. It doesn't matter that $+$ is an operation; any expression at all containing $a$ is the same as the equivalent expression with $b$ if $a=b$. The only relevant property is that $+$ be defined to equal something. This is even true for non-functions that fail the vertical line test, since the function value extraction operation is an expression in the ambient set theory (or whatever the foundation is). $\endgroup$ Jan 14 '15 at 5:59
  • 1
    $\begingroup$ @Bwmat Equality is not defined in any of the usual foundations of math. Instead it is "axiomatically defined", which is to say that it is an operation whose properties are described in the axioms without reducing it to more basic notions, since it is one of the basic notions. $\endgroup$ Jan 14 '15 at 17:49
  • 1
    $\begingroup$ @user31748 By the way that interpretation is known as Leibniz's law or the identity of indiscernibles. $\endgroup$ Jan 14 '15 at 17:53

This is a basic property of equality. An equation like $$a=b$$ means that $a$ and $b$ are different names for the same number. If you do something to $a$, and you do the same thing to $b$, you must get the same result because $a$ and $b$ were the same to begin with.

For example, how do we know that Samuel Clemens and Mark Twain were equal in height? Simple: Because they were the same person.

How do we know that $a+c$ and $b+c$ are equal numbers? Because $a$ and $b$ are the same number.

  • 2
    $\begingroup$ To add to this, the thing that you need do needs to be a well defined operation on the objects that you're considering (numbers in this case). For example, $6/2 = 1+2$. These are 2 different expressions for the same number, so it's not true that doing the same thing to each expression necessarily leaves you with an equality. E.g., if I write my expressions in opposite order, I get 2 things which are not equal: $2/6 \neq 2+1$. The issue is I've done something at the level syntatic expressions, not at the level of numbers. $\endgroup$
    – Kimball
    Jan 12 '15 at 9:23
  • 2
    $\begingroup$ Right. This would be like saying that because Mark Twain and Samuel Clemens are the same person, both names start with the same letters, which isn't true. $\endgroup$
    – MJD
    Jan 12 '15 at 13:06
  • 3
    $\begingroup$ Wait... Mark Twain isn't his real name? I didn't know that. $\endgroup$ Jan 12 '15 at 17:45
  • 1
    $\begingroup$ No, the cancellation property is not involved. Consider for example that if $x$ and $y$ are people, and you have $x=y$ then you can conclude that $x$ and $y$ are the same height. ("$x$ and $y$ are equal, so their heights are equal.") There is nothing like cancellation in this example, and the corresponding "cancellation law", that if $x$ and $y$ are the same height then they are the same person, is completely false. What is really happening here is as I said: if $x$ and $y$ are two names for the same thing, then operations on the things those names represent must yield the same result. $\endgroup$
    – MJD
    Jan 12 '15 at 22:19
  • 2
    $\begingroup$ Or to make a more mathematical-seeming argument, let $x$ and $y$ be elements of some monoid $\langle M, \oplus\rangle$ where the operation does not always have inverses. If $x=y$ you can still conclude $x\oplus a = y\oplus a$ for any $a$, but there is not generally a corresponding cancellation law because there may not be an inverse operation for $\oplus$. For example, suppose $x$ and $y$ are numbers, and $\oplus$ represents the "maximum" operation. Then if $x=y$ you can certainly conclude $\max(x,a) = \max(y,a)$, but the converse is false. And there is no cancellation law for $\max$. $\endgroup$
    – MJD
    Jan 12 '15 at 22:26

This is a consequence of the substitution property. We know that $a + c = a + c$, right? Certainly $a + c$ is the same thing as $a + c$. But since $b$ is the same thing as $a$, it follows that $a + c = b + c$.

  • $\begingroup$ Substitution is what came to my mind as well. $\endgroup$
    – jxh
    Jan 12 '15 at 22:28

This is an axiom of predicate logic. For example, check out this list of the axioms in predicate calulus, intended to be an ambient logic for ZFC set theory. Note axioms 13 and 14:

$$\vdash x=y\to (x\in z\to y\in z)$$ $$\vdash x=y\to (z\in x\to z\in y)$$

In set theory, the only basic atomic formulas are of the form $x=y$ or $x\in y$, so this, together with transitivity of equality (axiom 8), which will allow you to prove

$$\vdash x=y\to (x=z\to y=z)$$ $$\vdash x=y\to (z=x\to z=y),$$

is sufficient to prove by induction that for any predicate of the language $\varphi(x)$, it is a theorem that

$$\vdash x=y\to(\varphi(x)\leftrightarrow \varphi(y)).$$

And once you define class terms via $x\in\{x\mid\varphi\}\leftrightarrow\varphi$, you can prove

$$\vdash x=y\to A(x)=A(y)$$

for any class term $A(x)$ by converting it to the statement $$\vdash x=y\to (z\in A(x)\leftrightarrow z\in A(y))$$

using extensionality and applying the theorem above for predicates. This demonstrates how the rule $x=y\to f(x)=f(y)$ gets translated into a rigorous proof in a formal system.

  • $\begingroup$ You can take a look at Peano's arithmetic $\endgroup$
    – Bernard
    Jan 11 '15 at 23:01
  • $\begingroup$ @Bernard Actually, the linked page does not make any explicit reference to the axioms of propositional logic and predicate calculus used for the ambient logic on which to put Peano's axioms. So I don't think that directly answers the question. $\endgroup$ Jan 11 '15 at 23:08
  • $\begingroup$ Oh wait, it does give transitivity of equality as axiom 4 and $m=n\to Sm=Sn$ in axiom 6, and presumably you can prove $m=n\to m+p=n+p,mp=np$ by induction. $\endgroup$ Jan 11 '15 at 23:12

You're perhaps missing the point of people saying 'That's what equality means.' This is the natural result of equality. The basic property of equality is that one equal thing can be substituted in for another. So if A = B, then you can substitute A in for B, or B in for A, anywhere it is found. If you want the longer proof:

A = B  (initial proposition)
A = A  (equality substitution)
A + C = A + C  (all things are equal to themselves)  
A + C = B + C  (equality substitution)

I just want to throw in my two cents and go a bit deeper. First, the idea $a=b\rightarrow a+c=b+c$ is not an axiom of "arithmetic" per se. It's in fact a theorem derived from the following axiom:

Axiom of substitution. If $\phi(x)$ is a statement and: i) $\phi(a)$ holds; ii) $a=b$; then $\phi(b)$ holds. In logical symbols (which you probably can ignore): $$\forall a\forall b(\phi(a)\land a=b\rightarrow \phi(b))$$

What this really is is something of the meaning of equality. $a=b$ means that it is essentially redundant to write different letters - it's just notation. Thus, if $\phi(x)$ is the statement "$x$ is red", and we find a red object $a$, it's only natural that we can deduce that any object equal to $x$ is also red.

Next, (technically we need a lot of set theory to develop this purely foundationally, but we'll accept the idea of a function for now), we then have that if $a=b$, then $f(a)=f(b)$.

Proof. Let $\phi(x)$ be the statement $f(x)=f(a)$. Then $\phi(a)$ holds. Since $a=b$, $\phi(b)$ holds by the axiom and therefore $f(b)=f(a)\,$.$\square$

Now, as other answers have stated, we can simply let $f(x)=x+c$ and note that the above theorem implies what you are talking about. You can do similarly for multiplication by $c$.

One can think about the converse - in fact, it is not necessarily true that if $f(a)=f(b)$, then $a=b$. This is in fact a non-trivial condition known as one-to-one-ness or injectivity. In fact, the function $f(x)=x+c$ is injective since you can now subtract $c$ from each side, but for instance the function $g(x)=0x=0$ is not injective (why?)


As all the others have said, from $a=b$ you can conclude that $f(a)=f(b)$ for any function defined on a domain containing $\{a,b\}$.

There is a subtle point, however, that has not been addressed so far: An equation $$\Phi(x)=\Psi(x)\tag{1}$$ implicitly defines a solution set $S$ in the agreed domain of discourse. "Solving" such an equation means producing an "explicit" description of $S$, e.g., in the form of a list or of a parametric representation of $S$.

Applying some function $f$ to both sides of $(1)$ (say, squaring both sides) in order to obtain a simpler equation may very well alter (meaning: enlarge) the solution set $S$.


As others have pointed out, if a=b, then (a+c)=(b+c) follows from the replacement property of equality as follows:

everything is equal to itself       1 (a+c)=(a+c).
hypothesis                          2  a=b.
replacing the second a with b in 1  3 (a+c)=(b+c).

You can't infer that "if a < b then a + c < b + c" in this way, since a < a is false. Thus, < and = are not similar in this way.


Equal means same. If two things are equal then they're the same, so whatever you do to one of them you can do to the other one and expect to get the same result, because they're the same -- there is no difference between them to allow you to get a different result.


Not the answer you're looking for? Browse other questions tagged or ask your own question.