Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Difference of two squares

From Wikipedia, the free encyclopedia
Mathematical identity of polynomials

Inelementary algebra, adifference of two squares is onesquared number (the number multiplied by itself)subtracted from another squared number. Every difference of squares may befactored as theproduct of thesum of the two numbers and thedifference of the two numbers:

a2b2=(a+b)(ab).{\displaystyle a^{2}-b^{2}=(a+b)(a-b).}

Note thata{\displaystyle a} andb{\displaystyle b} can represent more complicated expressions, such that the difference of their squares can be factored as the product of their sum and difference. For example, givena=2mn+2{\displaystyle a=2mn+2}, andb=mn2{\displaystyle b=mn-2} :

a2b2=(2mn+2)2(mn2)2=(3mn)(mn+4).{\displaystyle a^{2}-b^{2}=(2mn+2)^{2}-(mn-2)^{2}=(3mn)(mn+4).}

In the reverse direction, the product of any two numbers can be expressed as the difference between the square of theiraverage and the square of half their difference:

xy=(x+y2)2(xy2)2.{\displaystyle xy=\left({\frac {x+y}{2}}\right)^{2}-\left({\frac {x-y}{2}}\right)^{2}.}

Proof

[edit]

Algebraic proof

[edit]

Theproof of the factorization identity is straightforward. Starting from theright-hand side, apply thedistributive law to get(a+b)(ab)=a2+baabb2.{\displaystyle (a+b)(a-b)=a^{2}+ba-ab-b^{2}.}By thecommutative law, the middle two terms cancel:baab=0{\displaystyle ba-ab=0}leaving[1](a+b)(ab)=a2b2.{\displaystyle (a+b)(a-b)=a^{2}-b^{2}.}The resulting identity is one of the most commonly used in mathematics. Among many uses, it gives a simple proof of theAM–GM inequality in two variables.

The proof holds not only for numbers, but for elements of anycommutative ring. Conversely, if this identity holds in aringR for all pairs of elementsa andb, thenR is commutative. To see this, apply the distributive law to the right-hand side of the equation and geta2+baabb2.{\displaystyle a^{2}+ba-ab-b^{2}.}For this to be equal toa2b2{\displaystyle \textstyle a^{2}-b^{2}}, we must havebaab=0{\displaystyle ba-ab=0}for all pairsa,b, soR is commutative.

Geometric proof

[edit]

The difference of two squares can also be illustrated geometrically as the difference of two square areas in aplane. In the diagram, the shaded part represents the difference between the areas of the two squares, i.e.a2b2{\displaystyle a^{2}-b^{2}}. The area of the shaded part can be found by adding the areas of the two rectangles;a(ab)+b(ab){\displaystyle a(a-b)+b(a-b)}, which can be factorized to(a+b)(ab){\displaystyle (a+b)(a-b)}. Therefore,a2b2=(a+b)(ab){\displaystyle a^{2}-b^{2}=(a+b)(a-b)}.

Another geometric proof proceeds as follows. We start with the figure shown in the first diagram below, a large square with a smaller square removed from it. The side of the entire square is a, and the side of the small removed square is b; thus, the area of the shaded region isa2b2{\displaystyle a^{2}-b^{2}}. A cut is made, splitting the region into two rectangular pieces, as shown in the second diagram. The larger piece, at the top, has width a and height a-b. The smaller piece, at the bottom, has width a-b and height b. Now the smaller piece can be detached, rotated, and placed to the right of the larger piece. In this new arrangement, shown in the last diagram below, the two pieces together form a rectangle, whose width isa+b{\displaystyle a+b} and whose height isab{\displaystyle a-b}. This rectangle's area is(a+b)(ab){\displaystyle (a+b)(a-b)}. Since this rectangle came from rearranging the original figure, it must have the same area as the original figure. Therefore,a2b2=(a+b)(ab){\displaystyle a^{2}-b^{2}=(a+b)(a-b)}.[2]

Usage

[edit]

Factorization of polynomials and simplification of expressions

[edit]

The formula for the difference of two squares can be used for factoringpolynomials that contain the square of a first quantity minus the square of a second quantity. For example, the polynomialx41{\displaystyle x^{4}-1} can be factored as follows:

x41=(x2+1)(x21)=(x2+1)(x+1)(x1).{\displaystyle x^{4}-1=(x^{2}+1)(x^{2}-1)=(x^{2}+1)(x+1)(x-1).}

As a second example, the first two terms ofx2y2+xy{\displaystyle x^{2}-y^{2}+x-y} can be factored as(x+y)(xy){\displaystyle (x+y)(x-y)}, so we have:x2y2+xy=(x+y)(xy)+xy=(xy)(x+y+1).{\displaystyle x^{2}-y^{2}+x-y=(x+y)(x-y)+x-y=(x-y)(x+y+1).}Moreover, this formula can also be used for simplifying expressions:(a+b)2(ab)2=(a+b+ab)(a+ba+b)=(2a)(2b)=4ab.{\displaystyle (a+b)^{2}-(a-b)^{2}=(a+b+a-b)(a+b-a+b)=(2a)(2b)=4ab.}

Complex number case: sum of two squares

[edit]

The difference of two squares is used to find thelinear factors of thesum of two squares, usingcomplex number coefficients.

For example, the complex roots ofz2+4{\displaystyle z^{2}+4} can be found using difference of two squares:

z2+4=z24i2=z2(2i)2=(z+2i)(z2i).{\displaystyle {\begin{aligned}z^{2}+4&=z^{2}-4i^{2}\\&=z^{2}-(2i)^{2}\\&=(z+2i)(z-2i).\\\end{aligned}}}

Therefore, the linear factors are(z+2i){\displaystyle (z+2i)} and(z2i){\displaystyle (z-2i)}.

Since the two factors found by this method arecomplex conjugates, we can use this in reverse as a method of multiplying a complex number to get a real number. This is used to get real denominators in complex fractions.[3]

Rationalising denominators

[edit]

The difference of two squares can also be used, in reverse, in therationalising ofirrationaldenominators.[4] This is a method for removingsurds from expressions (or at least moving them), applying to division by some combinations involvingsquare roots.

For example, the denominator of5/(4+3){\displaystyle 5{\big /}{\bigl (}4+{\sqrt {3}}{\bigr )}} can be rationalised as follows:

54+3=54+3×4343=5(43)4232=5(43)163=5(43)13.{\displaystyle {\begin{aligned}{\dfrac {5}{4+{\sqrt {3}}}}&={\dfrac {5}{4+{\sqrt {3}}}}\times {\dfrac {4-{\sqrt {3}}}{4-{\sqrt {3}}}}\\[10mu]&={\dfrac {5{\bigl (}4-{\sqrt {3}}{\bigr )}}{4^{2}-{\sqrt {3}}^{2}}}={\dfrac {5{\bigl (}4-{\sqrt {3}}{\bigr )}}{16-3}}={\frac {5{\bigl (}4-{\sqrt {3}}{\bigr )}}{13}}.\end{aligned}}}

Here, the irrational denominator4+3{\displaystyle 4+{\sqrt {3}}} has been rationalised to13{\displaystyle 13}.

Mental arithmetic

[edit]
Main article:Multiplication algorithm § Quarter square multiplication

The difference of two squares can also be used as an arithmetical shortcut. If two numbers have an easily squared average, their product can be rewritten as the difference of two squares. For example:27×33=(303)(30+3)=30232=891.{\displaystyle 27\times 33=(30-3)(30+3)=30^{2}-3^{2}=891.}

Difference of two consecutive perfect squares

[edit]

The difference of two consecutiveperfect squares is the sum of the twobasesn andn + 1. This can be seen as follows:

(n+1)2n2=((n+1)+n)((n+1)n)=2n+1.{\displaystyle {\begin{aligned}(n+1)^{2}-n^{2}&=((n+1)+n)((n+1)-n)\\[5mu]&=2n+1.\end{aligned}}}

Therefore, the difference of two consecutive perfect squares is an odd number. Similarly, the difference of two arbitrary perfect squares is calculated as follows:

(n+k)2n2=((n+k)+n)((n+k)n)=k(2n+k).{\displaystyle {\begin{aligned}(n+k)^{2}-n^{2}&=((n+k)+n)((n+k)-n)\\[5mu]&=k(2n+k).\end{aligned}}}

Therefore, the difference of two even perfect squares is a multiple of4 and the difference of two odd perfect squares is a multiple of8.

Galileo's law of odd numbers

[edit]
Galileo's law of odd numbers

A ramification of the difference of consecutive squares,Galileo's law of odd numbers states that the distance covered by an object falling without resistance in uniform gravity in successive equal time intervals is linearly proportional to the odd numbers. That is, if a body falling from rest covers a certain distance during an arbitrary time interval, it will cover3,5,7, etc. times that distance in the subsequent time intervals of the same length.

From the equation for uniform linear acceleration, the distance covereds=ut+12at2{\displaystyle s=ut+{\tfrac {1}{2}}at^{2}}for initial speedu=0,{\displaystyle u=0,} constant accelerationa{\displaystyle a} (acceleration due to gravity without air resistance), and time elapsedt,{\displaystyle t,} it follows that the distances{\displaystyle s} is proportional tot2{\displaystyle t^{2}} (in symbols,st2{\displaystyle s\propto t^{2}}), thus the distance from the starting point are consecutive squares forinteger values of time elapsed.[5]

Factorization of integers

[edit]

Several algorithms innumber theory and cryptography use differences of squares to find factors of integers and detect composite numbers. A simple example is theFermat factorization method, which considers the sequence of numbersxi:=ai2N{\displaystyle x_{i}:=a_{i}^{2}-N}, forai:=N+i{\displaystyle a_{i}:=\left\lceil {\sqrt {N}}\right\rceil +i}. If one of thexi{\displaystyle x_{i}} equals a perfect squareb2{\displaystyle b^{2}}, thenN=ai2b2=(ai+b)(aib){\displaystyle N=a_{i}^{2}-b^{2}=(a_{i}+b)(a_{i}-b)} is a (potentially non-trivial) factorization ofN{\displaystyle N}.

This trick can be generalized as follows. Ifa2b2{\displaystyle a^{2}\equiv b^{2}} modN{\displaystyle N} anda±b{\displaystyle a\not \equiv \pm b} modN{\displaystyle N}, thenN{\displaystyle N} is composite with non-trivial factorsgcd(ab,N){\displaystyle \gcd(a-b,N)} andgcd(a+b,N){\displaystyle \gcd(a+b,N)}. This forms the basis of several factorization algorithms (such as thequadratic sieve) and can be combined with theFermat primality test to give the strongerMiller–Rabin primality test.

Generalizations

[edit]
Vectorsa (purple),b (cyan) anda +b (blue) are shown witharrows

The identity also holds ininner product spaces over thefield ofreal numbers, such as fordot product ofEuclidean vectors:

aabb=(a+b)(ab){\displaystyle {\mathbf {a} }\cdot {\mathbf {a} }-{\mathbf {b} }\cdot {\mathbf {b} }=({\mathbf {a} }+{\mathbf {b} })\cdot ({\mathbf {a} }-{\mathbf {b} })}

The proof is identical. For the special case thata andb have equalnorms (which means that their dot squares are equal), this demonstratesanalytically the fact that two diagonals of arhombus areperpendicular. This follows from the left side of the equation being equal to zero, requiring the right side to equal zero as well, and so the vector sum ofa +b (the long diagonal of the rhombus) dotted with the vector differenceab (the short diagonal of the rhombus) must equal zero, which indicates the diagonals are perpendicular.

Difference of twonth powers

[edit]
Visual proof of the differences between two squares and two cubes

Ifa andb are two elements of a commutative ring, then[6]

anbn=(ab)(k=0n1an1kbk).{\displaystyle a^{n}-b^{n}=(a-b){\biggl (}\sum _{k=0}^{n-1}a^{n-1-k}b^{k}{\biggr )}.}

The second factor looks similar to thebinomial expansion of(a+b)n1{\displaystyle (a+b)^{n-1}}, except that it does not include thebinomial coefficients(n1k){\displaystyle {\tbinom {n-1}{k}}}.

See also

[edit]

Notes

[edit]
  1. ^"Difference of two squares - Factorising an algebraic expression - National 5 Maths Revision".BBC Bitesize. Retrieved9 April 2025.
  2. ^Slavit, David (2001)."Revisiting a Difference of Squares".Mathematics Teaching in the Middle School.6 (6): 381.ISSN 1072-0839. Retrieved10 April 2025.
  3. ^Complex or imaginary numbers TheMathPage.com, retrieved 22 December 2011
  4. ^Multiplying Radicals TheMathPage.com, retrieved 22 December 2011
  5. ^RP Olenick et al.,The Mechanical Universe: Introduction to Mechanics and Heat
  6. ^Grigorieva, Ellina (2015).Methods of Solving Nonstandard Problems. Birkhäuser. Eq. 2.13, p. 83.doi:10.1007/978-3-319-19887-3_2.ISBN 978-3-319-19886-6.

Further reading

[edit]

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Difference_of_two_squares&oldid=1322571208"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp