HOME

TheInfoList



OR:

In
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, the difference of two squares is a
squared A square is a regular quadrilateral with four equal sides and four right angles. Square or Squares may also refer to: Mathematics and science *Square (algebra), multiplying a number or expression by itself *Square (cipher), a cryptographic block ...
(multiplied by itself) number subtracted from another squared number. Every difference of squares may be factored according to the
identity Identity may refer to: * Identity document * Identity (philosophy) * Identity (social science) * Identity (mathematics) Arts and entertainment Film and television * ''Identity'' (1987 film), an Iranian film * ''Identity'' (2003 film), an ...
:a^2-b^2 = (a+b)(a-b) in
elementary algebra Elementary algebra encompasses the basic concepts of algebra. It is often contrasted with arithmetic: arithmetic deals with specified numbers, whilst algebra introduces variables (quantities without fixed values). This use of variables entail ...
.


Proof

The
proof Proof most often refers to: * Proof (truth), argument or sufficient evidence for the truth of a proposition * Alcohol proof, a measure of an alcoholic drink's strength Proof may also refer to: Mathematics and formal logic * Formal proof, a c ...
of the factorization identity is straightforward. Starting from the
left-hand side In mathematics, LHS is informal shorthand for the left-hand side of an equation. Similarly, RHS is the right-hand side. The two sides have the same value, expressed differently, since equality is symmetric.distributive law In mathematics, the distributive property of binary operations generalizes the distributive law, which asserts that the equality x \cdot (y + z) = x \cdot y + x \cdot z is always true in elementary algebra. For example, in elementary arithmetic, ...
to get :(a+b)(a-b) = a^2+ba-ab-b^2 By the commutative law, the middle two terms cancel: :ba - ab = 0 leaving :(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 the AM–GM inequality in two variables. The proof holds in any
commutative ring In mathematics, a commutative ring is a ring in which the multiplication operation is commutative. The study of commutative rings is called commutative algebra. Complementarily, noncommutative algebra is the study of ring properties that are not ...
. Conversely, if this identity holds in a ring ''R'' for all pairs of elements ''a'' and ''b'', then ''R'' is commutative. To see this, apply the distributive law to the right-hand side of the equation and get :a^2 + ba - ab - b^2. For this to be equal to a^2 - b^2, we must have :ba - ab = 0 for all pairs ''a'', ''b'', so ''R'' is commutative.


Geometrical demonstrations

The difference of two squares can also be illustrated geometrically as the difference of two square areas in a plane. In the diagram, the shaded part represents the difference between the areas of the two squares, i.e. a^2 - b^2. The area of the shaded part can be found by adding the areas of the two rectangles; a(a-b) + b(a-b), which can be factorized to (a+b)(a-b). Therefore, 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. The area of the shaded region is 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 is a+b and whose height is a-b. This rectangle's area is (a+b)(a-b). Since this rectangle came from rearranging the original figure, it must have the same area as the original figure. Therefore, a^2-b^2 = (a+b)(a-b).


Uses


Factorization of polynomials and simplification of expressions

The formula for the difference of two squares can be used for factoring
polynomial In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An exampl ...
s that contain the square of a first quantity minus the square of a second quantity. For example, the polynomial x^4 - 1 can be factored as follows: :x^4 - 1 = (x^2 + 1)(x^2 - 1) = (x^2 + 1)(x + 1)(x - 1) As a second example, the first two terms of x^2 - y^2 + x - y can be factored as (x + y)(x - y), so we have: :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-(a-b)^2=(a+b+a-b)(a+b-a+b)=(2a)(2b)=4ab


Complex number case: sum of two squares

The difference of two squares is used to find the linear factors of the ''sum'' of two squares, using
complex number In mathematics, a complex number is an element of a number system that extends the real numbers with a specific element denoted , called the imaginary unit and satisfying the equation i^= -1; every complex number can be expressed in the fo ...
coefficients. For example, the complex roots of z^2 + 4 can be found using difference of two squares: :z^2 + 4 : = z^2 - 4i^2 (since i^2 = -1) : = z^2 - (2 i)^2 : = (z + 2 i)(z - 2 i) Therefore, the linear factors are (z + 2 i) and (z - 2 i). Since the two factors found by this method are
complex conjugate In mathematics, the complex conjugate of a complex number is the number with an equal real part and an imaginary part equal in magnitude but opposite in sign. That is, (if a and b are real, then) the complex conjugate of a + bi is equal to a - ...
s, 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.


Rationalising denominators

The difference of two squares can also be used in the rationalising of
irrational Irrationality is cognition, thinking, talking, or acting without inclusion of rationality. It is more specifically described as an action or opinion given through inadequate use of reason, or through emotional distress or cognitive deficiency. T ...
denominator A fraction (from la, fractus, "broken") represents a part of a whole or, more generally, any number of equal parts. When spoken in everyday English, a fraction describes how many parts of a certain size there are, for example, one-half, eight ...
s. This is a method for removing surds from expressions (or at least moving them), applying to division by some combinations involving
square root In mathematics, a square root of a number is a number such that ; in other words, a number whose '' square'' (the result of multiplying the number by itself, or  ⋅ ) is . For example, 4 and −4 are square roots of 16, because . ...
s. For example: The denominator of \dfrac can be rationalised as follows: :\dfrac : = \dfrac \times \dfrac : = \dfrac : = \dfrac : = \dfrac : = -\dfrac. Here, the irrational denominator \sqrt + 4 has been rationalised to 13.


Mental arithmetic

The difference of two squares can also be used as an arithmetical short cut. If two numbers (whose average is a number which is easily squared) are multiplied, the difference of two squares can be used to give you the product of the original two numbers. For example: : 27 \times 33 = (30 - 3)(30 + 3) Using the difference of two squares, 27 \times 33 can be restated as :a^2 - b^2 which is 30^2 - 3^2 = 891.


Difference of two consecutive perfect squares

The difference of two consecutive perfect squares is the sum of the two bases ''n'' and ''n''+1. This can be seen as follows: : \begin (n+1)^2 - n^2 & = & ((n+1)+n)((n+1)-n) \\ & = & 2n+1 \end Therefore, the difference of two consecutive perfect squares is an odd number. Similarly, the difference of two arbitrary perfect squares is calculated as follows: : \begin (n+k)^2 - n^2 & = & ((n+k)+n)((n+k)-n) \\ & = & k(2n+k) \end Therefore, the difference of two even perfect squares is a multiple of 4 and the difference of two odd perfect squares is a multiple of 8.


Factorization of integers

Several algorithms in number theory and cryptography use differences of squares to find factors of integers and detect composite numbers. A simple example is the Fermat factorization method, which considers the sequence of numbers x_i:=a_i^2-N, for a_i:=\left\lceil \sqrt\right\rceil+i. If one of the x_i equals a perfect square b^2, then N=a_i^2-b^2=(a_i+b)(a_i-b) is a (potentially non-trivial) factorization of N. This trick can be generalized as follows. If a^2\equiv b^2 mod N and a\not\equiv \pm b mod N, then N is composite with non-trivial factors \gcd(a-b,N) and \gcd(a+b,N). This forms the basis of several factorization algorithms (such as the
quadratic sieve The quadratic sieve algorithm (QS) is an integer factorization algorithm and, in practice, the second fastest method known (after the general number field sieve). It is still the fastest for integers under 100 decimal digits or so, and is consider ...
) and can be combined with the Fermat primality test to give the stronger Miller–Rabin primality test.


Generalizations

The identity also holds in
inner product space In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, often ...
s over the field of
real numbers In mathematics, a real number is a number that can be used to measure a ''continuous'' one-dimensional quantity such as a distance, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small variations. Every re ...
, such as for
dot product In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an alg ...
of
Euclidean vector In mathematics, physics, and engineering, a Euclidean vector or simply a vector (sometimes called a geometric vector or spatial vector) is a geometric object that has magnitude (or length) and direction. Vectors can be added to other vectors ...
s: :\cdot - \cdot = (+)\cdot(-) The proof is identical. For the special case that and have equal norms (which means that their dot squares are equal), this demonstrates analytically the fact that two diagonals of a
rhombus In plane Euclidean geometry, a rhombus (plural rhombi or rhombuses) is a quadrilateral whose four sides all have the same length. Another name is equilateral quadrilateral, since equilateral means that all of its sides are equal in length. The ...
are
perpendicular In elementary geometry, two geometric objects are perpendicular if they intersect at a right angle (90 degrees or π/2 radians). The condition of perpendicularity may be represented graphically using the '' perpendicular symbol'', ⟂. It c ...
. 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 of (the long diagonal of the rhombus) dotted with the vector difference (the short diagonal of the rhombus) must equal zero, which indicates the diagonals are perpendicular.


Difference of two nth powers

If ''a'' and ''b'' are two elements of a commutative ring ''R'', then a^n-b^n=\left(a-b\right)\left(\sum_^ a^b^k\right).


History

Historically, the Babylonians used the difference of two squares to calculate multiplications. For example: 93 x 87 = 90² - 3² = 8091 64 x 56 = 60² - 4² = 3584


See also

* Congruum, the shared difference of three squares in arithmetic progression * Conjugate (algebra) *
Factorization In mathematics, factorization (or factorisation, see English spelling differences) or factoring consists of writing a number or another mathematical object as a product of several ''factors'', usually smaller or simpler objects of the same kind ...


Notes


References

* *{{cite book , first1=Alan S. , last1=Tussy , first2=Roy David , last2=Gustafson , title=Elementary Algebra , edition=5th , publisher=Cengage Learning , year=2011 , isbn=978-1-111-56766-8 , pages=467–469 , url=https://books.google.com/books?id=xwOrtVKSVpoC&pg=PA467


External links


difference of two squares
at mathpages.com Elementary algebra Commutative algebra Mathematical identities Articles containing proofs Subtraction