News for hackers. Stuff that matters.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by FartyMcFarter on Sunday December 15, 2024 @09:24AM (#42423544)
This reminds me of this video about why we need to be very careful when inspecting visual proofs: https://www.youtube.com/watch?v=VYQVlVoWoPY (it includes a "proof" that pi equals exactly 4).

In this case, as someone else pointed out below, this proof has unjustified assumptions in it (at least it assumes that b < a).

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by kleiba on Sunday December 15, 2024 @09:33AM (#42423592)
> at least it assumes that b < a

But you can fairly assume that wlog.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by im3w1l on Sunday December 15, 2024 @09:39AM (#42423617)
No
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by umanwizard on Sunday December 15, 2024 @09:42AM (#42423640)
Why not? Either b < a, b = a or b > a. If b = a both sides are zero and the result is trivial. If b > a just swap the names of a and b and multiply both sides by -1.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by stephencanon on Sunday December 15, 2024 @10:04AM (#42423782)
The purely geometric proof works just fine without the case analysis if you use the oriented area.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by im3w1l on Sunday December 15, 2024 @09:54AM (#42423708)
With this additional justification I accept it, yes. But (imo) now you are doing algebra. And then you might as well prove it just by distributing the RHS of the original expression.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by dagss on Sunday December 15, 2024 @12:09PM (#42424527)
This additional justification is so trivial it's just left out for brevity. In general a lot of statements are "accepted" even if not each and every detail is spelled out.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by davrosthedalek on Sunday December 15, 2024 @12:43PM (#42424730)
Sorry, but no. First, "just switch a and b" is clearly wrong, and we had multiple people propose that (Without the adjustment of sign). So not that trivial, I would argue. At least not more trivial than the underlying equality one wants to prove in the first place.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by im3w1l on Sunday December 15, 2024 @02:54PM (#42425531)
Let me fully spell out the proof that generality is not lost

Assume that b > a.

1. Swap the names a and b.

b^2-a^2 ?= (a+b)(b-a)

2. Multiply both sides by minus one

a^2-b^2 ?= -(a+b)(b-a)

3. Absorb the minus into the second factor

a^2-b^2 ?= (a+b)(a-b)

This is the same as the original equality we wanted to prove.

Now compare that to the purely algebraic proof for the whole theorem.

1. Distribute over the first parenthesis

(a+b)(b-a) = a(a-b) + b(a-b)

2. Distribute again

(a+b)(b-a) = a^2-ab + ba-b^2

3. Cancel equal terms

(a+b)(b-a) = a^2 - b^2

The proof that generality is not lost is of similar length to a full proof of the theorem!

So if you think the former can be skipped, then you must accept a proof of the whole theorem that simply reads "Follows from trivial algebraic manipulation"

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by dagss on Monday December 16, 2024 @06:42AM (#42430172)
They may be equally long, but length when written is IMO not a good measure of complexity.

The 2nd I would need pen and paper for to keep my head straight doing the distributive law. The 1st I can do in my head as:

"If b is larger than a, the left side will be negative instead of positive, but also "b-a" gets a negative sign, and these cancel each other, so it is the same"

But I agree with you anyway ...this is indeed "doing algebra".

I agree that the figure would have been better if it said that in that figure it displays the case where a is larger than b. And we should probably call it visualization of an algebraic proof, instead of visual proof.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by nemetroid on Monday December 16, 2024 @09:14AM (#42431121)
The entire proof is trivial.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by wrsh07 on Sunday December 15, 2024 @10:02AM (#42423766)
Isn't this resorting to algebra to fix the visual proof? How do you fix it visually?
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by olddustytrail on Sunday December 15, 2024 @11:01AM (#42424112)
Turn your monitor sideways?
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by bmacho on Sunday December 15, 2024 @12:38PM (#42424691)
You do it 3 times, a=b, a<b, a>b.

.. now that I think about it, the "visual proof" only 'proves' the statement for a specific 'a' and 'b'. Probably there is a proof, that can handle all 'a' and 'b' pairs at once.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by cowsandmilk on Sunday December 15, 2024 @01:36PM (#42425071)
What is a is positive and b is negative? How do you extend the visual proof?
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by chisquared on Sunday December 15, 2024 @03:18PM (#42425681)
If b is negative, define c = -b, and use the linked result to show that

a^2 - b^2 = a^2 - (-c)^2 = a^2 - c^2 = (a + c)(a - c) = (a + b)(a - b)

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by jacobolus on Sunday December 15, 2024 @02:02PM (#42425237)
You can do this if you extend your concepts of length and area to signed quantities. You have to be clear to explain how the setup of the drawing works, but instead of cutting away a square of side b out of the corner of the square of side a, you might end up appending a negatively-signed square of side −b.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by chisquared on Sunday December 15, 2024 @03:19PM (#42425685)
There’s no need for this extension: https://news.ycombinator.com/item?id=42425681
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by jacobolus on Monday December 16, 2024 @08:44AM (#42430869)
Well the whole point here is that we're doing geometry. If you just want to do symbol twiddling you don't need the picture at all.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by lizzas on Sunday December 15, 2024 @02:16PM (#42425319)
I am not convinced since in this world you can have the following rects:

1 x 1

1 x -1

-1 x -1

Is just the middle one a cut out?

I reckon you need the axiom from the field to do generalize this to negative numbers.

https://en.m.wikipedia.org/wiki/Field_(mathematics)

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by callingbull on Sunday December 15, 2024 @02:27PM (#42425389)
> just swap the names

Then you've just skipped the case when a^2 - b^2 is negative. The diagram does not prove that case and swapping the names still doesn't prove it.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by chisquared on Sunday December 15, 2024 @03:15PM (#42425665)
> Then you've just skipped the case when a^2 - b^2 is negative.

Not really. If b > a, then swap them to conclude that b^2 - a^2 = (b + a)(b - a), which is what the visual proof demonstrates.

Your conclusion is equivalent to saying that a^2 - b^2 = (a + b)(a - b).

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by shreyshnaccount on Sunday December 15, 2024 @02:35PM (#42425425)
if you just extend the metaphor in the diagram, and imagine a negative length to just refer to direction, sure it does :)

personally, I love visual proofs because they can communicate an idea efficiently, sure they have their pitfalls, but its less about the actual mechanism of the proof and more about the core idea that lets me appreciate how its working- and visual proofs add a pseudo-physical intuition that helps me appreciate it.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by callingbull on Sunday December 15, 2024 @02:54PM (#42425527)
Trying the proof with a < b, with the b square from the bottom-right as in the diagram, I get a region to the top and left, and moving a piece (differently to the diagram) I get (a + b)(b - a) as a positive area for that region, and then flip the sign because it's negative.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by karmakaze on Sunday December 15, 2024 @12:59PM (#42424825)
For those thinking this doesn't hold, note that "wlog" means without loss of generality (having numerous examples in proofs).
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by lizzas on Sunday December 15, 2024 @02:07PM (#42425267)
A good example of the shortening of proofs. Like "Observe that... {unproven thing}"

It is not necessarily bad but explains why every step isn't always proven. To avoid tedium and long papers.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by blablabla123 on Sunday December 15, 2024 @10:38AM (#42423974)
I vaguely remember from an Analysis lecture when Mathematical rigor wasn't such a thing, the professor mentioned a famous Mathematician (maybe Euler?) who had a notebook with hundreds of proofs where many of the visual ones didn't turn out right. Definitely nice for intuition though since this is oftentimes lacking
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by orangepanda on Sunday December 15, 2024 @09:31AM (#42423578)
It still holds if you’re not bothered by negative-area rectangles
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by FartyMcFarter on Sunday December 15, 2024 @09:35AM (#42423598)
But I definitely am bothered.

A visual proof is supposed to appeal to our visual intuition - I don't know about you, but negative areas are not something that is visually intuitive to me.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by mithametacs on Sunday December 15, 2024 @09:45AM (#42423659)
It seems like an elegant addition to the understanding.

Maybe if you viewed an animation where `a` starts larger than `b`, and steps till it's smaller.

Then you could see where the negativity happens. And seeing is nice.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by Out_of_Characte on Sunday December 15, 2024 @09:42AM (#42423634)
Negative area's can be the only practical solution. Imagine the worst case: a 10*10 room with a pillar in the middle. How would you calculate that?
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by hansvm on Sunday December 15, 2024 @12:11PM (#42424544)
The concept of negative area still feels like it'd get messy in a hurry. For a square pillar, the side lengths should be the same, suddenly giving you imaginary lengths just for the eventual area subtraction to work out. For a negative volume though, you need cubic roots of unity for the side lengths, throwing off your area calculations. Has anyone actually put together a system where the sort of concept you're describing is cohesive?
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by mtizim on Sunday December 15, 2024 @12:53PM (#42424794)
You're in for a nice trip, the concept is called Geometric Algebra:

https://youtu.be/60z_hpEAtD8?si=HHs_9m0IJ43nfI3S (~50m video)

TLDW: Yes, the concept is there, makes much more sense than a cross product (which is just an oriented area) and generalizes really nicely.

Alternatively, read: https://en.m.wikipedia.org/wiki/Bivector

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by hansvm on Monday December 16, 2024 @05:00PM (#42435934)
Gotcha; it's less that my complaint doesn't apply, but more that it isn't relevant (i.e., "squares" and "cubes" aren't especially interesting constructs which need to coexist nicely, and if you relax that constraint then directional geometry can be very interesting). Does that sound right?
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by FartyMcFarter on Sunday December 15, 2024 @09:50AM (#42423683)
I don't see that as negative area. I see it as subtracting two areas. Both the room and the pillar have a positive area, none of them has negative lengths or areas.

Kids learn subtraction before they learn negative numbers - once you learn negative numbers, you know that addition and subtraction are almost interchangeable, but this is not necessarily intuitive to begin with.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by ses1984 on Sunday December 15, 2024 @10:03AM (#42423777)
Subtracting two areas is like adding two areas where one is negative…right?
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by FartyMcFarter on Sunday December 15, 2024 @10:05AM (#42423785)
Yes , but see my second paragraph. Just because something is true it doesn't mean it's intuitive.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by trimethylpurine on Sunday December 15, 2024 @11:37AM (#42424362)
That's interesting. To me it seems intuitive. It's a real area that can be drawn like any other. The sign is an operator describing what function to visualize, not a property of the measured area. So thinking of it in that way eliminates any need for the term "negative area."

But, intuition is subjective, so you may need to adjust the terminology to fit the visualization.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by FartyMcFarter on Sunday December 15, 2024 @11:55AM (#42424458)
It is intuitive on some higher level, now that I know about signs, operators, negative numbers and all that. But when talking about visual information (i.e. "visual proof"), it isn't intuitive in that context.

In addition to that, for all I know there could be some pitfalls involved with negative areas which I'm not aware of. Even if there aren't any pitfalls, this isn't immediately obvious to someone who isn't familiar with the concept of negative area.

If I'm willing (or forced) to think in such abstract terms, I would much prefer an algebraic proof to this visual proof.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by ses1984 on Sunday December 15, 2024 @12:55PM (#42424807)
Your intuition is irrelevant if they’re mathematically equivalent.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by jacobolus on Sunday December 15, 2024 @02:10PM (#42425281)
There are no serious pitfalls with oriented areas. Adding them to your arsenal of geometric proof tools will greatly simplify many proofs. Not having such a concept makes ancient geometry books much more complicated than they need to be, often requiring lots of detailed case analysis where the separate cases are essentially the same, just oriented opposite ways.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by wruza on Sunday December 15, 2024 @03:53PM (#42425908)
It’s intuitive, just in more dimensions. People have different ideas and abilities to imagine/think dimensions, but on top of that we rarely train them to do that.

I think that build up to tensor fields should be in every school program. If you can’t think of a field, you’re mathematically disabled and too many basic ideas about real world are inaccessible to you. This limits the ability to vote on a set of topics and participate in non-local decisions that involve systemic understanding. Same for formal logic and statistics.

Once familiarized with that, you can easily start thinking of nonlinearly signed areas, complex areas and areas simultaneously positive and negative by an attribute.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by thaumasiotes on Sunday December 15, 2024 @01:15PM (#42424925)
If you're bothered by the idea of negative-area rectangles, there's no need to justify the assumption that b < a, because that's the only way you can assign any meaning to either side of the equation.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by FartyMcFarter on Sunday December 15, 2024 @03:16PM (#42425674)
The equation isn't about rectangles at all, so I disagree. The rectangles only exist for the purposes of this proof. Any resulting complications are on the proof, not the reader's burden.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by seanhunter on Sunday December 15, 2024 @07:29PM (#42426976)
One easy place to get some intuition for signed areas is in the context of integrals.

You know position is the integral of velocity right? So say you walk in a straight line from your starting point, then you keep slowing down until you come to a stop and walk backwards past your starting point.

If you were to graph your velocity vs time at some point it would dip below the t axis because your velocity would be negative. Ok cool. If you integrate from the point you came to a stop and started walking backwards you’re calculating the area above the negative velocity curve(between it and the time axis). You’ll find it is a negative area. You know it has to be negative because you walked backwards past your starting point so it gets so negative that it cancels out all the positive area from when you were walking forwards.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by foxglacier on Sunday December 15, 2024 @07:58PM (#42427099)
This sort of thing is more useful for teaching than being an actual proof. You teach the same concept in different ways and the students can form a more solid understanding of the underlying concept independent of symbols or shapes, or at least they may understand it one way if they don't get the other ways.

You can do all sorts of factorizations the same way and handle negative areas by drawing them in a different color.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by colejohnson66 on Sunday December 15, 2024 @10:02AM (#42423767)
Yes, but that’s because it relies on infinite repetitions of the perimeter adjustment. Rearranging some boxes here does not involve infinity.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by amelius on Sunday December 15, 2024 @10:08AM (#42423796)
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by TheRealPomax on Sunday December 15, 2024 @12:33PM (#42424666)
No, it assumes "one side is smaller than the other": the labels are arbitrary, so there iss no case where b is larger than a as we can just swap the labels and get a>b again. Even though you might think there are two cases that we need to look at because we're using two letters, there's actually only on case to demonstrate because we're demonstrating a property of the inequality.

The only "but what if..." would be if a=b, which has no geometric proof, but also doesn't need one because "zero = zero times anything" is (by definition) true for fields.

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by davrosthedalek on Sunday December 15, 2024 @12:39PM (#42424697)
The problem is not symmetric between a and b (because a-b isn't). You cannot swap them. (And even if, this swapping is not part of the "proof", so in any case the proof is incomplete.)
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by xlii on Sunday December 15, 2024 @03:23PM (#42425716)
IMO GP is about the labelling: Instead of a2-b2 use longer2-shorter2 (and on visual representation one side will always be longer, as per GPs explanation).

Diagram doesn't show proof for "shorter2-longer2". I believe showing negative area would spark more controversy (imagine that negative area is painted orange, visual area would still be positive).

Shorter2-longer2 gives you same absolute value with reverse signed, so it feels symmetric to me (can't remember what the formal definition is), i.e:

    1.   a2 -  b2  =  ( a-b)(a+b)  # * -1
    2. -(-a2 + b2) = -(-a+b)(a+b)
    3. -(b2 -  a2) = -( b-a)(b+a)  # / -1
    4.   b2 -  a2  =  ( b-a)(b+a)
Edit: https://imgur.com/a/olETWfr - crude image with labels swap as it seems it's bringing some controversy.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by TheRealPomax on Sunday December 15, 2024 @04:06PM (#42425983)
It's fully symmetric. Basic arithmetic covers the following identities:

   1. (a² - b²) = -(b² - a²), because of even powers
   2. (a - b) = -(b - a)
So the following two statements are the same statement:

   3. (a² - b²) = (a - b)(a + b) 
   4. -(b² - a²) = -(b - a)(b + a)
Let's assume this only holds for a>b (because we're content that the geometric proof shows that):

   3a. (a² - b²) = (a - b)(a + b), a > b
But we don't know if it also holds for b>a... after all, how would you show a negative areas? What does that even mean Turns out: it doesn't matter, the b>a relation reduces to the same formulae as the a>b relation, so the geometric proof covers both. To see why, some more elementary algebra: we can invert both sides of (4), provided we also invert the relation between a and b, so this:

   4a. -(b² - a²) = -(b - a)(b + a), b > a
Is the same as this:

   4b. (b² - a²) = (b - a)(b + a), a > b, by inversion
Of course, algebra doesn't care about which labels you use, as long as the identities and relations between them are preserved, so we can swap "a" for "b" and "b" for "a" in both the identity and relation in (4b) to get:

   4c. (a² - b²) = (a - b)(a + b), b > a
And we found a symmetry that we (maybe) didn't realize was there:

   3a. (a² - b²) = (a - b)(a + b), a > b
   4c. (a² - b²) = (a - b)(a + b), b > a
Same formula, inverse relation. It turns out that it doesn't matter whether we start with a>b or b>a, they reduce to the same expression, thanks to those even powers, and a geometric proof for one is by definition a proof for the other.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by davrosthedalek on Sunday December 15, 2024 @04:25PM (#42426084)
That's the point. The geometric proof requires that you show the applicability for the b>a case with algebra. If you don't, it's not complete. And if you do, you can just show everything with algebra in the first place, and shorter, and also for a,b element C (instead of R), at the same time.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by TheRealPomax on Sunday December 15, 2024 @05:07PM (#42426315)
I'd have to disagree - it is perfectly fine to show a visual proof and simply state that we can reduce b>a to a>b and this proof therefore covers both, optionally with a little "I don't believe you, show me the math" pop out.

The visual proof is the neat part that people literally can't think of unless you show it to them, after which things might suddenly click for them. The algebraic proof is boring AF and doesn't make for a good maths hook ;)

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by petermcneeley on Sunday December 15, 2024 @12:35PM (#42424677)
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by ComplexSystems on Sunday December 15, 2024 @01:41PM (#42425099)
There is no problem with the proof except the assumption that the value in the limit is the same as the value at infinity. If we simply define pi(n) as a function from N U {inf}, which gives the value that "pi" takes at the nth step of the process, and pi(inf) as the value that it actually takes for the circle, then we simply have a function where lim n->inf pi(n) ≠ pi(lim n->inf). For all finite n, it equals 4, and then at infinity it equals 3.1415... .

There are ways to reformulate the above so that "infinity" isn't involved but this is the clearest way to think of it. It isn't much different than the Kronecker delta function delta(t), which is 1 at t=0 and 0 elsewhere. We have lim t->0 delta(t) ≠ delta(lim t->0 t).

Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by saghm on Sunday December 15, 2024 @05:53PM (#42426541)
My geometry teacher in 9th grade was adamant that we couldn't assume lengths and angles in diagrams except where explicitly labeled. In particular, he said that we should never assume that a diagram is drawn to scale; if the diagram happened to depict a quadrilateral as a square, unless something stated that it was a square (or we had sufficient information to determine that it was), we should treat it as an unidentified quadrilateral and proceed only with the actual information provided or else he would "take more points off than the question was worth" on tests. On one of our quizzes, he did provide a diagram that looked like a kite (two pairs of adjacent sides each with the same length but different length than the other pair) but listed the angles in a way that could only work for a parallelogram that was not a kite, and he made good on his word to take off extra points for people who misidentified it as a kite.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by brookst on Sunday December 15, 2024 @11:38PM (#42428059)
I like this teacher.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by saghm on Monday December 16, 2024 @02:20PM (#42434330)
He was pretty great! He was super smart, super passionate, and had a great sense of humor; everything I could have asked for in a teacher.
Re:A visual proof that a^2 – b^2 = (a + b)(a – b) by mmooss on Sunday December 15, 2024 @08:03PM (#42427113)
> we need to be very careful when inspecting visual proofs

This is not a visual proof but a nice visualization, like a written explanation that is not a proof.

For an actual novel proof, nobody would imagine that they could eyeball it for a few minutes and conclude it was complete, correct, and consistent - maybe with the exception of professional mathematicians examining for simple proofs. You might eyeball it and follow its logic and not see any immediate flaws, but that's different.