32

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?

Thanks!

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.

Marvin
  • 548
Bowen Jin
  • 571
  • 22
    It's not an axiom of arithmetic, but it is an axiom of logic. – Git Gud Jan 11 '15 at 21:50
  • 12
    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. – Eff Jan 11 '15 at 21:58
  • 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. – Ooker Jan 12 '15 at 02:03
  • 2
    @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. – ruakh Jan 12 '15 at 07:02
  • 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), (2a)=(2b), ((2a)/b) = ((2b)/b), ((2a)/b) = (2(b/b)), ... every operation distributes over =, and = is commutative and associative. Division is not associative: ((a/b)/c)=(a/(bc)). Subtraction is anti-commutative: (a-b) = -(b-a) – Rob Jan 12 '15 at 19:54
  • (a < b), ((a < b) + c), ((a+c) < (a+c)) [rightDistribute + over <]. like the divide rule which won't be defined for a zero right hand element (for numeric types), with a,b,c being numeric types... ((a < b) * d)[d >= 0] --> ((a * d) < (b * d)), but ((a < b) * d)[d < 0] --> ((a * d)<(a * d)). What an operation "means" should define exactly what it does, so when you go to implement it you should not need to know what it "means" (this is how a computer program works in any case!). – Rob Jan 12 '15 at 20:34
  • Just curious why you would want to add or multiply both sides of an equation. We are taught to do this in high school algebra to "solve" equations. If you are looking at methods of algebra in general, I'm guessing you really want a cancellation rule: e.g. $a+b=c+b\implies a=c$.This rule can be derived, for example, from Peano's axioms. – Dan Christensen Jan 13 '15 at 05:42
  • @DanChristensen or the observation that $f(x) = x+b$ is injective – Yakk Jan 13 '15 at 16:29

9 Answers9

61

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$.

DanielV
  • 23,556
  • 8
    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. – GEdgar Jan 12 '15 at 14:47
  • 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)$ – hyportnex Jan 13 '15 at 15:54
  • @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). – Mario Carneiro Jan 14 '15 at 05:59
  • Isn't this defining equality in terms of itself? Maybe not since the equality operations in 'a = b' and 'f(a) = f(b)' might not be the same domain... – Bwmat Jan 14 '15 at 06:49
  • To elaborate on GEdgar's comment, for a constant $n$, $\cdot+n$ is by definition composition $s\circ s\circ\ldots\circ s$ where $s$ is successor function (required by Peano axioms to exist) and thus really a function. – Ennar Jan 14 '15 at 11:47
  • @Ennar Actually, in PA $+$ is axiomatically defined. A "definition" of the sort you've described wouldn't work because it is not a closed formula (different numbers of $s$'s for different $n$'s) and would not even be applicable for non-constant $n$. In set theory you can define it via transfinite recursion as the unique function that satisfies $m+0=m$, $m+s(n)=s(m+n)$ for all natural numbers $m,n$. – Mario Carneiro Jan 14 '15 at 17:45
  • 1
    @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. – Mario Carneiro Jan 14 '15 at 17:49
  • 1
    @user31748 By the way that interpretation is known as Leibniz's law or the identity of indiscernibles. – Mario Carneiro Jan 14 '15 at 17:53
  • I endorse Mario's characterization of equality. – DanielV Jan 14 '15 at 18:37
  • Example of a non-function: $1/2 = 2/4$ but numerator of $1/2$ is not equal to numerator of $2/4$. – GEdgar Jan 15 '15 at 15:35
  • @GEdgar Interesting example of different meanings of equality. – DanielV Jan 15 '15 at 18:31
40

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.

MJD
  • 65,394
  • 39
  • 298
  • 580
  • 2
    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. – Kimball Jan 12 '15 at 09:23
  • 2
    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. – MJD Jan 12 '15 at 13:06
  • 3
    Wait... Mark Twain isn't his real name? I didn't know that. – Corey Ogburn Jan 12 '15 at 17:45
  • Doesn't the cancellation property of abstract algebra come into play here (i.e. it's not simply a matter of being a "basic property of equality")? See this section of the wikipedia article on cancellation property for what I am wondering about. – joeA Jan 12 '15 at 21:36
  • 1
    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. – MJD Jan 12 '15 at 22:19
  • 2
    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$. – MJD Jan 12 '15 at 22:26
  • Thank you for clearing that up for me @MJD -- both comments were helpful. – joeA Jan 12 '15 at 23:00
  • @MJD Mark Twain's name starts with letter "S". And if we go for "but he had two names" argument, then the question "what's the first letter of the Mark Twain's name" is nonsensical. – Joker_vD Jan 13 '15 at 16:51
23

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.

  • You can take a look at Peano's arithmetic – Bernard Jan 11 '15 at 23:01
  • @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. – Mario Carneiro Jan 11 '15 at 23:08
  • 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. – Mario Carneiro Jan 11 '15 at 23:12
23

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$.

Tanner Swett
  • 10,624
10

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)
9

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?)

theage
  • 3,677
6

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$.

4

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.

1

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.

user541686
  • 13,772