33

In a linear algebra text book, one homework question I received was:

Prove that $\mathbf{a \cdot b} = \frac{1}{4}(\|\mathbf{a + b}\|^2 - \|\mathbf{a - b}\|^2)$.

Where $\mathbf{a}$ and $\mathbf{b}$ are vectors in $\Bbb{R}^n$.

This is trivial to prove if we start from $\frac{1}{4}(\|\mathbf{a + b}\|^2 - \|\mathbf{a - b}\|^2)$ and reverse engineer it in $\Bbb{R}^2$: $$ \|\mathbf{a + b}\|^2 = a_1^2 + 2a_1b_1 + b_1^2 + a_2^2 + 2a_2b_2 + b_2^2 \\ \|\mathbf{a - b}\|^2 = a_1^2 - 2a_1b_1 + b_1^2 + a_2^2 - 2a_2b_2 + b_2^2 \\ \|\mathbf{a + b}\|^2 - \|\mathbf{a - b}\|^2 = 4a_1b_1 + 4a_2b_2 \\ \frac{1}{4}(\|\mathbf{a + b}\|^2 - \|\mathbf{a - b}\|^2) = \frac{4}{4}(a_1b_1 + a_2b_2) \\ = a_1b_1 + a_2b_2 = \mathbf{a \cdot b} $$

But I'm worried about whether or not proofs like this are "legal", if that makes any sense. There was no wording in the question stating that I couldn't start from the right side of the identity, but I still have this strange feeling of guilt that I should've tried solving the identity starting from the left side and working in the "normal" direction.

For questions like these, is it okay to start from the right side of the identity? Would what I get out of doing the question in reverse be the same as if I did it normally?

Jonas Meyer
  • 53,602
user3002473
  • 8,943
  • 36
    Yes, of course that's legal. In math, you're allowed to do anything that's logically justified. – anomaly Jun 30 '14 at 02:43
  • 19
    In proving identities, it's perfectly acceptable to start from the RHS and go to the LHS, as long as your steps are always fully "reversible". That means that you can use the double-implication symbol $\iff$ between every step. So you might have to be careful about doing stuff like going from $x^2 = a^2 \implies x = a$, because that's not acceptable ($x$ can be $-a$) but if you've been careful to avoid that sort of pitfall, it's fine. However, if you're worried about the presentation, you should recognise that you should be able to reverse everything and rewrite it to go from the LHS to RHS. – Deepak Jun 30 '14 at 02:49
  • 3
    I've done stuff like this many times - as I'm sure many others have around these parts. Sometimes it's hard to see how one side relates to the other but maybe you can make it meet in the middle. – Cameron Williams Jun 30 '14 at 02:51
  • One thing to be careful of when changing the order of the equality is the implicit domain definition. Some time writing $f(x)=g(x)$ implicitly means "$f(x)=g(x)$ for all $x$ in the domain of $f$". So if $f$ have a bigger domain, it is possible that working from right to left give you a nice identity that only valid in a smaller domain, which you might misapply when using the identity when going from left to right. For example, $x=(\sqrt{x})^{2}$ on the real. – Gina Jun 30 '14 at 05:04
  • 5
    @Deepak It seems like you are confusing logical equivalence with equality. The OP is asking about a proof that two things are equal. – Trevor Wilson Jun 30 '14 at 05:39
  • @Gina: "Some time writing $f(x)=g(x)$ implicitly means "$f(x)=g(x)$ for all $x$ in the domain of $f$"." Could you provide a reference for this? When the domain where the equality is not explicitely given, I have always seen that it implicitely means "for any $x$ in the intersection of the domains of $f$ and $g$". – Taladris Jun 30 '14 at 06:13
  • 1
    "Reverse engineering" is perfectly fine. It is usually easier to simplify a complicated expression (valid simplifications in any order will give you the result in most situations) than complicate a simple expression: there is so much way to make things complicated! – Taladris Jun 30 '14 at 06:17
  • @Deepak Your comments about reversibility apply just as well to a proof of an equality that goes from left to right. Equality is, by definition, symmetric. A proof that $x=y$ is valid if, and only if, it is a valid proof that $y=x$. – David Richerby Jun 30 '14 at 09:36
  • 1
    Be careful though, as remarked all steps should be reversible. For example, consider this "backwards" proof of the statement 0 = 1. Proof: Start from 0 = 1. Then by symmetry 1 = 0. Add these two equations: 1 = 1. This is trivially true, so we're done - just read these steps backwards for the proof.

    If you want to be really sure, I would always write down the full proof the other way around.

    – CompuChip Jun 30 '14 at 09:40
  • 1
    Hey, half the galaxy's difficulties are solved by "Reversing the Polarity" so why not proofs? :-) – Carl Witthoft Jun 30 '14 at 12:17
  • 2
    OP: What Trevor and David mean is that, when you prove $a = b$ by finding intermediate $c$s, you don't have to worry about "reversible steps", because if $b = c$, then $c = b$. But if you want to prove $a = b$, and you want to "reverse engineer" it by messing with both sides of the equation, and deriving a truth, then you worry about reversibility, because $P \implies Q$ isn't the same as $Q \implies P$. – Henry Swanson Jun 30 '14 at 14:05
  • 1
    @CompuChip, you've repeated a confusion that Deepak made 7 hours earlier and that two people have since pointed out. – jwg Jun 30 '14 at 15:23
  • This is a valid proof, but just be sure that, if you're taking an introductory proofs course, your teacher is "OK" with this approach. To emphasize the difference between $\implies$ $\impliedby$ and $\iff$, my teacher would mark such a proof as incorrect, unless the $\iff$s were explicitly noted. – apnorton Jul 01 '14 at 04:12
  • The nice thing about equality is that it is symmetrical, so if x=y then also y=x. Moreover, x=y if and only if y=x. So why not just start from y=x instead of x=y, and then you are doing it "the right way 'round". – Zane Jul 01 '14 at 12:41
  • I understand your point... reverse engineering doesn't seem to be "creative" or "wise" in a mathematical point of view, when you think about it, you're actually asking for the motivation of the identity and not for a proof of it.

    Moreover, this is (in my opinion) one of the most important things in mathematics: CREATION. After something is created, proving it (knowing what we are expecting to prove) becomes an exercise (just like that one you've offered to us).

    – Daniel Jul 02 '14 at 11:42

5 Answers5

34

It's absolutely fine to reverse engineer proofs! As long as the proof works in the end, it doesn't matter how you got to it - in fact, reverse engineering proofs is a fairly standard technique.

However you need to be careful in this approach: you need to make sure that each step is reversible ($p$ implies $q$ does not mean $q$ implies $p$). With your example here though, we can easily reverse each step because everything is just equality.

It is worth noting that although your proof method is fine, the proof itself doesn't quite get what you want because you have assumed that $a,b\in\mathbb{R^2}$ when you wish to prove for any two vectors $a,b\in\mathbb{R^n}$. This problem, though, is easily dealt with (can you see how?).

10

Personally, I'd suggest this approach of solution (which address the loss of generality by assuming $\mathbb{R^2}$:

$$4\mathbf{a}\cdot \mathbf{b} = [\mathbf{(a+b)\cdot(a+b)} - \mathbf{(a-b)\cdot(a-b)}]$$

which leads almost immediately to the required result.

Deepak
  • 26,801
10

Not only is it 'OK', it is equally as valid to go from the RHS to the LHS as it is to go from the LHS to the RHS.

Moreover, sometimes one finds that the best approach is to work from both ends simultaneously.

As a student you may well find that the simultaneous approach is very useful in a exam situation.

Perhaps when fully written up, a single direction might be easier to follow, but the overwhelming concern is correctness.

Indeed, one thing that might impress a maths examiner beyond correctness is cleverness, which in maths usually means finding a trick or shortcut. From that viewpoint, being smart about thinking whether to from RHS to LHS rather than LHS to RHS is a good thing.

Keith
  • 1,019
8

I don't know about "reverse engineering" in general, but I'd guess it's always fine: as anomaly commented, you can do anything that's logically justified.

In this case the answer is particularly clear, however. Equality is a symmetric relation: $x = y$ means exactly the same thing as $y = x$. A proof of one is the same as a proof of the other (with the addition of a step at the end where you use this symmetry property to flip the two sides, but usually there is no reason to write this because it will be obvious to the reader.)

I can imagine some situations where writing $x = y$ rather than $y = x$ might be better from a stylistic perspective, but style is usually less important that correctness when doing homework.

Trevor Wilson
  • 16,989
3

It is definitely a valid proof, as the other answers mention.

One downside with a proof like this is that you are left wondering how you come up with the identity in the first place..

spin
  • 11,956