# The One Rule for manipulating equations

All variables in this article are implicitly universally quantified for brevity.

Manipulating equations is hard, right? There are so many rules to remember…

Wrong. There is actually only one rule, known as the substitution property of equality:

$\boxed{a = b \implies f(a) = f(b)}$
That's it. Nobody teaches this in school, they'll teach you “you can multiply both sides of the equation, except by zero” and what not, but in reality, it's that simple.

However, in order to apply the rule correctly, it's crucial to understand the difference between implication and equivalence. The rule **works only one way**. There's a variant that goes both ways, but it's kind of a tautology, so there isn't really a point in using it:

**Theorem.** If $f$ is an injective function, then $a = b \iff f(a) = f(b)$.

**Proof.** $(\Rightarrow)$ Follows from the substitution property.

$(\Leftarrow)$ Follows from the definition of an injective function.

Now we can see how all the specific rules easily follow from the substitution property.

**Theorem.** $a = b \iff a \pm c = b \pm c$

**Proof.** $(\Rightarrow)$ Let $f(x) = x \pm c$ and use the substitution property.

$(\Leftarrow)$ Let $f(x) = x \mp c$ and use the substitution property.

**Theorem.** $a = b \implies a \cdot c = b \cdot c$; the implication is an equivalence iff $c \ne 0$

**Proof.** $(\Rightarrow)$ Let $f(x) = x \cdot c$ and use the substitution property.

$(\Leftarrow)$ Given that $c \ne 0$, let $f(x) = \frac{x}{c}$ and use the substitution property.

**Theorem.** $a = b \iff \frac{a}{c} = \frac{b}{c}$

**Proof.** Note that

$c$ must not equal

$0$, otherwise the right-hand side is not defined.

$(\Rightarrow)$ Let $f(x) = \frac{x}{c}$ and use the substitution property.

$(\Leftarrow)$ Let $f(x) = x \cdot c$ and use the substitution property.

**Theorem.** $a = b \iff \frac{1}{a} = \frac{1}{b}$

**Proof.** Note that

$a,b$ must not equal

$0$, otherwise the right-hand side is not defined.

$(\Rightarrow)$ Let $f(x) = \frac{1}{x}$ and use the substitution property.

$(\Leftarrow)$ Let $f(x) = \frac{1}{x}$ and use the substitution property.

**Theorem.** $a = b \implies a^2 = b^2$; the implication is an equivalence iff there is a guarantee that $a \ge 0 \land b \ge 0$

**Proof.** $(\Rightarrow)$ Let $f(x) = x^2$ and use the substitution property.

$(\Leftarrow)$ Given that $a \ge 0 \land b \ge 0$, it follows that $a = \sqrt{a^2} \land b = \sqrt{b^2}$. Let $f(x) = \sqrt{x}$ and use the substitution property.

**Theorem.** $a = b \iff \sqrt{a} = \sqrt{b}$

**Proof.** Note that

$a,b$ must be positive, otherwise the expressions are not defined.

$(\Rightarrow)$ Let $f(x) = \sqrt{x}$ and use the substitution property.

$(\Leftarrow)$ Let $f(x) = x^2$ and use the substitution property.

**Theorem.** $a = b \implies c^a = c^b$ for $c > 0$. The implication is an equivalence iff $c > 0 \land c \ne 1$

**Proof.** $(\Rightarrow)$ Let $f(x) = c^x$ and use the substitution property.

$(\Leftarrow)$ Let $f(x) = \log_c(x)$ and use the substitution property.

**Theorem.** $a = b \iff \log_c(a) = \log_c(b)$ for $c > 0 \land c \ne 1$

**Proof.** Note that

$a,b$ must be positive, otherwise the expressions are not defined.

$(\Rightarrow)$ Let $f(x) = \log_c(x)$ and use the substitution property.

$(\Leftarrow)$ Let $f(x) = c^x$ and use the substitution property.

Notice how all the theorems and proofs look the same, aside from having to be careful about injectivity. Is there really a point in memorizing something so trivial?