Euclidean plane geometry to Pythagoras' theorem

Incidence and betweeness

I1 (Incidence Axiom 1) Every line contains at least two points.

I2 (Incidence Axiom 2) Any two distinct points in space have exactly one line that contains them.

Notation. line(AB) denotes the unique line guaranteed by I2 to contain A and B. Note that if C is on line(AB) then line(AC) = line(AB).

T1 Two distinct lines intersect in at most one point.

Proof: Let l and m be distinct lines. If there are two distinct points A and B which are on both lines, then l = line(AB) = m by I2. This contradicts the assumption that l and m are distinct, and so there can be at most one point on both lines. qed.

Exercise 1 . Let l and m be the lines with equations and respectively. Find the point P of intersection of l and m. Let A = [2,7] and B = [0,b]. Find b so that P is on the line through A and B.

> l := 3*x + 2*y = 12;
m := 4*x + y = 10;

> sol := solve({l,m},{x,y});

> P := subs(sol,[x,y]);

> A := [2,7];
B := [0,b];

> sol2 :=solve((b-A[2])/(B[1]-A[1])=(P[2]-A[2])/(P[1]-A[1]),{b});

The notion of distance between two points is not defined, although it is assumed that each line looks just like the 'number line', the set of real numbers. Intuitively, this means that we can place the ruler (number line) down on any line and set up a 1-1 correspondence from the points on the line to the real numbers. That is what the Ruler Axiom states.

RA (Ruler Axiom) There is a one-to-one correspondence from the points on a line to the real numbers so that the distance from A to B on the line is the absolute value of the difference of the numbers a and b corresponding to the points.

>

Notation . The distance from point A to point B is denoted by AB.

Definition . If the ruler has been placed on a line, then the number x corresponding to the point X on the line is called the ' coordinate ' of the point.

Exercise 2. Use the ruler axiom to show that distance has these properties

(i) AB = BA.

(ii) and AB= 0 if and only if A = B.

Solution. Lay the ruler down on line(AB) and let a and b be the coordinates of A and B respectively.

(i) Now by the notation, AB = and BA = . But by properties of absolute value, , so AB = BA.

(ii) = AB by properties of absolute value. The second part is true because the correspondence set up by the ruler is 1-1: different points have different coordinates.

Definition. If A, B, and C are distinct points on a line, then B is between A and C if AB + BC = AC.

T2 If B is between A and C, and C is between B and D, then B is between A and D and C is between A and D.

>

Proof . We will show that B is between A and D. The proof that C is between A and D is similar.

First to see that A, B, and D lie on a line, we know that A, B, and C lie on line(BC) since B is between A and C. Also B, C, and D lie on line(BC) since C is between B and D. Hence A, B, and D lie on line(BC).

Next, to see that AB+BD = AD, lay the ruler down on line(AB) and let a, b, c and d be the coordinates of A, B, C, and D respectively. We can assume that a < b, for otherwise just turn the ruler over lengthwise and lay it back down. Hence AB = . Now B is between A and C, so AB+BC = AC, and so by the ruler axiom,

(1)

By the order axioms for numbers, either c < a < b, or a < c < b, or a < b < c. But if c < a, then (1) becomes , which says that b = a, a contradiction since A, B and C are distinct and different points have different coordinates by RA. Likewise if a < c < b, (1) becomes , which says that b = c, also a contradiction. Hence we have a < b < c. In the same way, from C between B and D and b < c, we get that b < c < d. Hence a < b < d and so

or AB + BD = AD. This proves that B is between A and D. qed .

Exercise 3 . Show that given any three distinct points on a line, one of them is between the other two. Use the ruler axiom.

Solution . Let l be a line and let A, B, and C be distinct points on l. Lay the ruler down on l and let a, b, and c be the coordinates of A, B, and C respectively. The trichotomy axiom for real numbers tells us that a, b, and c are arranged in one of 6 possible ways: a < b < c or c < b < a or b < a < c or c < a < b or a < c < b or b < c < a. We claim that in each case one of A, B, and C is between the other two. The argument is similar for each case: let's do the 4th case c < a < b. Here we see that CA = , AB = and CB = . Hence CA + AB = = CB, and so A is between C and B in this case. qed

Exercise 4 . Let A = [3,4], , and C = [x,3]. Find x so that A, B, and C lie on a line. Which is between the other two?

Solution : Since the 2nd coordinate of A lies between the 2nd coordinates of C and B, A should lie between C and B. We can write an equation for the line thru A and B . Now if C is going to satisfy this equation, , or x = . Checking that CA + AB = CB:

CA = = , AB = = , and CB = = , so indeed C is between A and B.

> A:=[3,4]: B:= [-4,7]: C:=[x,3]:

> eqn := y - A[2] = (B[2]-A[2])/(B[1]-A[1])*(x - A[1]);

> solx := solve(subs(y=3,eqn),{x});

> dist := (p,q) -> sqrt((p[1]-q[1])^2+(p[2]-q[2])^2);

> dist([16/3,3],A),dist(A,B) , dist([16/3,3],B) ;

>

Definition. Let A and B be distinct points. The ray starting at A and passing through B, denoted ray(AB), is the set of all points X such that X = A, or X is between A and B, or X = B, or B is between A and X.

T3 . If A and B are distinct points, then the line(AB) is the union of the ray(AB) with the ray (BA).

>

Proof . We will show that T3 follows from Exercise 3 above. Let X be a point on the line(AB). Then by the exercise, A is between X and B (in which case X is on the ray(BA)), X is between A and B (in which case X is on both rays), or B is between A and X (in which case X is on the ray(AB)). So the line(AB) is a subset of the union of the rays. On the other hand, let X be in the union of the rays. Then it is in one of them, and in either case it is collinear with A and B, so the union of the rays is a subset of the line. So

line(AB) = ray(AB) union ray(BA). qed .

Definition . Let A and B be distinct points. The segment seg(AB) is defined as the set of all points X such that X = A or X = B or X is between A and B.

Definition . A set S of points in the plane is convex if given any two points A and B in S, the segment seg(AB) is a subset of S.

Exercise . Let A and B be points. Then the line(AB) is convex. Also the ray(AB) is convex.

Solution: To show line(AB) is convex, let P and Q be points on the line. Then seg(PQ) consists of P, Q and all points on the line(PQ) which are between P and Q. In particular, points on the segment seg(PQ) lie on the line(PQ). But line(PQ) = line(AB) by I2 (P and Q lie on line(AB)). qed .

Exercise . Let S and T be convex sets. Show that intersection of S and T is convex.

Solution: Let A and B be points in the intersection of S and T. We want to show that the seg(AB) is a subset of the intersection of S and T. Let X be a point in seg(AB). Then X is in S since S is convex. X is also in T since T is convex. So X is in the intersection of S and T. Hence seg(AB) is a subset of S intersect T. qed.

PS Each line separates the plane into two disjoint convex sets (called sides of the line) such that any segment which contains a point from each side contains a point from the line.

>

Notation . If l is a line and H and K are the two sides of the line in the plane, then if C is a point in H, then H is called the C-side of l

Definition . A set of points is said to be collinear if ........

Definition . Let A, B, and C be noncolliner points. The triangle ABC is the union of the segments seg(AB), seg(BC) and seg(CA). A, B, and C are called the ........... of the triangle and the segments which make up the triangle are called the ............ of the triangle.

T4 . If a line l meets one side of a triangle, then it meets another side of the triangle.

>

Congruent Triangles

PrA (Protractor axiom) Let AB-> be a ray on the edge of a closed half-plane H. For each real number d with 0 < d < 180 , there is exactly one ray AP-> with P in H , such that m PAB = d. Further, every angle has measure between 0 and 180.

AAA (Angle addition axiom) If D int BAC, then m BAD + m DAC = m BAC.

T5 Supplements of congruent angles are congruent.

Idea of proof. Use the definitions of congruent angles, supplementary angles and some algebra.

T6 Complements of congruent angles are congruent.

Idea of proof .

Definition . Two angles form a linear pair if they have a side in common and their remaining sides are opposite rays.

T6.5 Two angles which form a linear pair are supplementary.

Proof . Let angle(ABD) and angle(CBD) form a linear pair with m( angle(ABD) ) = and m(angle(CBD)) = .

By the trichotomy law of numbers, + < 180, or + = 180 or + > 180. We will show the first and last cases lead to contradictions and hence the middle case must hold true, that is, the angles are supplementary.

Case 1: Suppose + < 180. Then by PrA there is a point P on the D-side of line(AC) so that m(angle(PBC)) = + . The point P lies in the interior of angle(ABD) (why?). Hence D lies in the interior of angle(PBC) and so by AAA,

+ = m(angle(PBC) = m(angle(PBD)) + m(angle(DBC)) = m(angle(PBD)) + .

It follows by subtraction that = m(angle(PBD)). But m(angle(PBD)) < , since P is in the interior of angle(ABD). This is a contradiction and case 1 cannot occur.

Case 2 : Suppose + > 180. Then > 180 - > 0 and so by the protractor axiom there is a point P in the interor of angle(ABD) so that m(angle(DBP)) = 180 - . But now D is in the interior of angle(PBC) and so by AAA,

m(angle(PBC)) = m(angle(PBD)) + m(angle(BDC)) = (180 - ) + = 180. This contradicts the protractor axiom and we conclude that the case + = 180 must hold true. qed

Definition . Two angle are vertical angles if they have the same vertex and each side of one angle is the opposite ray of a side of the other angle.

T7 Vertical angles are congruent.

Idea of proof: Let angle(ABC) and angle(DBE) be vertical angles with ray(BA) and ray(BE) opposite rays. Then angle(ABC) and angle(ABD) form a linear pair (why?) and so are supplementary (why?). Also angle(ABD) and angle(DBE) form a linear pair and so are supplementary. Now use T5 to finish off the argument. qed.

Definition . Two triangles ABC and DEF are congruent under the correspondence A to D, B to E, and C to F if each pair of corresponding sides are congruent (that is, AB = DE, BC = EF and CA = FD) and each pair of corresponding angles are congruent (that is, m(angle(A)) = m(angle(D)), m(angle(B)) = m(angle(E)), m(angle(C)) = m(angle(F))).

SAS If two sides and the included angle of one triangle are congruent to the corresponding parts of another triangle, then the triangles are congruent.

T8 If two sides of a triangle are congruent, the angles opposite these sides are congruent.

Proof : Suppose ABC is a triangle with AB = AC. Then ABC is congruent with ACB by SAS since AB = AC,

angle(A) is congruent with angle(A) and AC = AB. So the remaining parts of ABC are congruent with their corresponding parts of ACB. In particular the angle opposite seg(AB), angle(C), is congruent with the angle opposite seg(AC), angle(B). qed

T 8.5 (ASA) If two angles and the included side of one triangle are congruent to the corresponding parts of another triangle, then the triangles are congruent.

Proof. Suppose ABC and DEF have AB = DE, m(angle(A)) = m(angle(D)), m(angle(B)) = m(angle(E)),

We will show that AC = DF and hence ABC and DEF are congruent by SAS. If AC <> DF, then one is less than the other. We can suppose AC < DF. Then use RA to construct F' on seg(AC) so that AF' = DF. Now by SAS, ABF' and DEF are congruent, and hence m(angle(ABF')) = m(angle(DEF)). Note that since F' is between A and C, m(angle(ABF')) < m(angle(ABF')) + m(angle(F'BC)) = m(angle(ABC)). But m(angle(ABC)) = m(angle(DEF)) (why?). Hence m(angle(DEF)) < m(angle(DEF)), a contradiction. qed

T9 If two angles of a triangle are congruent, then the sides opposite them are congruent.

Idea of Proof. Use ASA.

T10 A triangle is equilateral if and only if it is equiangular.

Idea of Proof. Use T9 to show the if part and T8 to show the only if part.

T11 An exterior angle of a triangle is greater in measure than either remote interior angle.

Restatement: Given triangle ABC. Show angle(ACB) < angle(CBD) and angle(CAB) < angle(CBD).

Idea of proof: Construct midpoint M of seg(CB). Extend seg(AM) to seg(AE) so that MB = ME. Now angle(AMC) and angle(BME) are congruent since they are vertical angles (T7) and so triangle(AMC) is congruent with triangle(EMB) by SAS. So angle(C) is congruent to its corresponding angle(MBE) which in turn is smaller in measure than angle(CBD) by AAA. The second conclusion is handled the same way, using instead of angle(CBD) its vertical partner. qed

T12 There is exactly one perpendicular to a line that contains a point not on the line.

Restatement: Given a line l and a point P not on l. Show there is one and only one line m thru P perpendicular to l.

Proof : To show there is one, pick points A and B on l and let = m(angle(PAB)).

Use the protractor and ruler axioms to construct a point Q on the non-P side of line l so that angle(QAB) has measure and QA = PA. Since Q is not on the P-side of l, the seg(PQ) intersects line l in a point, call it M. Now since AM = AM, we know by SAS that AMP is congruent with AMQ. Hence the corresponding angles angle(PMA) and angle(QMA) are congruent. They also form a linear pair and so the sum of their measures is 180 (T6.5). But then each angle must have measure 90 and so line(PQ) is perpendicular to line l.

To show there is no more than one line thru P perpendicular to l, suppose there is another. Then it will intersect line l at a point N different from M. But now the triangle PMN has an exterior angle of measure 90 with a remote interior angle of measure 90. This contradicts the exterior angle theorem. (T11) and so there is exactly one line thru P perpendicular to l. qed

T12.5 (SSS) If three sides of one triangle are congruent to the corresponding parts of another triangle, then the triangles are congruent.

Idea of Proof. Let ABC and DEF be triangles with AB = DE, BC = EF, and CA = FD. Use ASA to construct a congruent copy ABC' of DEF with C' on the opposite side of line(AB). Let M be the intersection of segment(CC') with line(AB). (M exists by PS). Use T8 to show angle(ACM) is congruent with angle(AC'M) and also angle(BCM) is congruent with angle(BC'M). Then use AAA to show angle(ACB) is congruent with angle(AC'B). Now use SAS to show triangle(ABC) is congruent with triangle(ABC') and hence with triangle(DEF) qed

>

T13 If two sides of a triangle are not congruent, the angles opposite them are not congruent and the larger angle is opposite the larger side.

Proof : Let ABC be a triangle with seg(AB) not congruent to seg(BC). Then AB < BC or AB > BC. We can suppose AB < BC. Use RA to construct point D between B and C so that BD = BA. Then by T8, m(angle(BAD)) = m(angle(BDA)). Now angle(BDA) is an exterior angle of CAD and so by T11 m(angle(BDA)) > m(angle(DCA)). Also m(angle(BAD)) < m(angle(BAC) (why?). From this it follows that m(angle(C)) < m(angle(BAC)) (how exactly?) qed

T14 If two angles of a triangle are not congruent, then the sides opposite them are not congruent and the larger angle is opposite the larger side.

Idea of Proof: Call the angles alpha and beta and the sides opposite a and b respectively. Assume alpha < beta.

Then a can't be equal to b by T8. Also b can't be less than a (use RA, T8, T11, AAA)

code

T15 Two lines in a plane perpendicular to a third line in the same plane are parallel.

Idea of proof. Assume they meet. Get a violation of the exterior angle theorem. (T11)

T16 If a line in a plane is perpendicular to one of two parallel lines in the same plane, then it is also perpendicular to the other.

Idea of Proof . Follows from T15 and the parallel axiom. (PA)

T17 If two lines are cut by a transversal so that the alternate interior angles are congruent, then the lines are parallel.

Idea of Proof. Assume they meet. Get a violation of the exterior angle theorem (T11).

T18 If two parallel lines are cut by a transversal, then the alternate interior angles are congruent.

Restatement . Given lines l and m cut by a transversal t at A and B forming alternate interior angles <1 and <2 shown in diagram. Show <1 is congruent with <2.

Idea of Proof. Use AAA to construct line l' thru A so that the alternate interior angles formed are congruent. Then by T17 the line l' is parallel with m. By PA, l' = l. Hence <1 is congruent with <2. qed.

T19 The sum of the measures of the angles of a triangle is 180 degrees.

Restatement . Given ABC Show m( angle (A)) + m(angle(B)) + m(angle(C)) = 180.

Idea of Proof . Use AAA to construct a line l thru C which is parallel with line(AB). angle(A) and angle(1) are congruent (T18). angle(B) and angle(2) are congruent. (T18). angle(1) + angle(C) + angle(2) = 180. qed.

T20 The sum of the measures of the interior angles of a convex n-gon is (n-2)180 degrees.

Idea of Proof. Pick a point in the interior of the n-gon and dissect the n-gon into n triangles, each of which, by T19, has 180 in it, so the sum of the interior angles is degrees. qed

>

T21 The sum of the measures of the exterior angles of a convex n-gon, one at each vertex, is 360 degrees.

Idea of Proof . The sum of those exterior angles together with their associated interior angles is degrees, and this is also by T20 + sum of exterior angles. From this it follows that sum of exterior angles is 360. qed .

T22 A diagonal of a parallelogram divides it into two congruent triangles and hence the opposite sides of a parallelogram are congruent.

Idea of Proof. Use T18 twice and ASA to prove the first part. The second part follows from the first part.

T23 If the opposite angles are congruent and the adjacent angles are supplementary or the opposite sides of a quadrilateral are congruent, the quadrilateral is a parallelogram.

Idea of Proof. In the first case, use T17 twice to get it. In the second case use SSS and then T17 twice to get it.

T24 The diagonals of a quadrilateral bisect each other if and only if the quadrilateral is a parallelogram.

Given : quadrilateral ABCD. To show : seg(AC) and seg(BD) intersect at the midpoint of each if and only if AB is parallel to CD and AD is parallel to BC.

Idea of Proof . if part: Let M be the point of intersection. By T22 AD = CB. By T18, angle(ADM) is congruent with angle MBC and angle(DAM) is congruent with angle(BCM). So by ASA, triangle(DAM) is congruent with triangle(BCM). Hence the corresponding sides CM = MA and DM = MB.

only if part : Let M be the point of intersection. By the vertical angle theorem T7, angle(DMA) is congruent with angle(BMC). Since the diagonals bisect each other, DM = BM and CM = AM. Hence triangle(DAM) is congruent with triangle(BCM) by SAS. But then angle(DAM) is congruent with angle(BCM), and so line(AD) is parallel with line(BC) by T17. In the same manner, show line DC is paralle with line(AB). qed

T25 Two distinct lines parallel to a third are parallel to each other.

Idea of Proof. Get this straight from the parallel axiom PA.

>

Theory of similar triangles

T26 If three or more parallel lines intercept congruent segments on one transversal, they intercept congruent segments on every transversal.

Given : l, m, and n are parallel with transversals t and s. AB = BC

To show: A'B' = B'C'

Idea of Proof: Use RA to mark D between B and B' so that AA' = DB' and E between C and C' so that BB' = EC'.

Use SAS to show triangle ADA' is congruent with triangle B'A'D. Then conclude AD = A'B' and angle(ADA') is congruent with angle(B'A'D) (why?) Then conclude line(AD) is parallel with line s (why?). In a similar way, argue that BE = B'C' and line(BE) is parallel with s. Now know line(AD) is parallel with line(BE). (why?). Now use a couple of theorems and ASA to conclude that triangle(ABD) is congruent with triangle(BCE). So AD = BE (why?). So A'B' = B'C' (why?) qed

T27 If a segment joins the midpoints of two sides of a triangle, then it is parallel to the third side and has half the length of the third side.

Given : triangle ABC and M and N midpoints of AC and BC respectively.

Show MN is parallel with AB and MN = 1/2 AB.

Idea of Proof. Draw the line l through M parallel to AB and the line through C parallel to AB. By T26, l must bisect BC at N, so MN = l is parallel with AB. Now draw the line t through M parallel with BC and the line through A parallel with BC. Again by T26, t must bisect AB at a point R. By ASA (T8.5), triangle ARM is congruent with triangle MNC and so MN = AR = 1/2 of AB. qed.

Definition . Two triangles ABC and DEF are similar under the correspondence A to D, B to E, and C to F if the corresponding sides are proportional and the corresponding angles are congruent, that is, = , and m(angle(A)) = m(angle(D)), m(angle(B)) = m(angle(E)) and m(angle(C)) = m(angle(F))..

T28 If the three angles of one triangle are congruent to the three angles of another triangle, then the triangles are similar.

Given: triangle(ABC) and triangle(DEF) with m(angle(A)) = m(angle(D)), m(angle(B)) = m(angle(E)), and m(angle(C))= m(angle(F)).

To show: and

Proof : If AB = DE, then the triangles are congruent and all three ratios are 1. So assume DE > AB.

The proof is by contradiction Assume the second equality fails, say (the argument will be similar if the first fails).

Construct points B' on ray(AB) and C' on ray(AC) so that AB' = DE and AC' = DF. Then triangle(AB'C') is congruent with triangle(DEF), and it will suffice to show leads to a contradiction. First note that line(BC) is parallel with line(B'C') because angle(ABC) is congruent with angle(AB'C') (why?). Now choose a rational number between and . Cross multiply and get m AB < and m AC > . Choose m points , ... , , ..., on ray(AB) with for each i = 1 to . Construct points on ray AC so that is parallel with B'C'. Now by T26, the segments are congruent with the segment for each i. Now + + ... = m ( AB) < , so is between A and B'. Also m ( AC) > and so (by a similar argument) C' is between A and . From this we see that and are on opposite sides of B'C' and hence the line segments intersect by PS. But they are parallel and we have a contradiction. qed.

T29 If two angles of one triangle are congruent to two angles of another, then the triangles are similar.

Hint. Follows quickly from T19 and T28

T30 A line parallel to one side of a triangle that intersects the other two sides in distinct point divides these two sides into proportional segments.

Hint. A special case of T28.

T31 A line that intersects two sides of a triangle in distinct points and divides these two sides into proportional segments is parallel to the third side.

Given : triangle(ABC) with D between A and B and E between A and C so that AD/AB = AE/AC.

To show: DE is parallel with BC.

Hint on proof. Construct point E' on AC so that DE' is parallel with BC. Then use T30 to argue that AD/AB = AE'/AC. Then use RA to argue that E = E'.

T32 If two pairs of corresponding sides of two triangles are proportional and their included angles are congruent, then the two triangles are similar.

Note T30 is the converse of T31. The diagram looks like the diagram for T31, except you can draw MN parallel to BC because that is given.

>

>

T33 If the corresponding sides of two triangles are proportional, then the two triangles are similar.

Theory of right triangles

T34 If the hypotenuse and a leg of one right triangle are congruent to the corresponding parts of another right triangle, then the triangles are congruent.

Given: right triangles ABC and DEF with hypotenuses AB = DE and legs AC = DF

To show : angle(A) is congruent with angle(D) and hence by SAS triangle(ABC) is congruent with triangle(DEF).

Proof outline . Suppose not. We can assume that m(angle(A)) < m(angle(D)) (why?) Then construct B' on FE

so that m(angle(FDB')) = m(angle(A)). So triangle CAB is congruent with triangle FDB' (why?). So AB = DB' (why?). So m(angle(EB'D))= m(angle(B'ED)) (why?) So m(angle(EB'D)) < 90 (why?). But m(angle(EB'D)) > 90 by the exterior angle theorem. qed

Note: There is a much shorter proof using pythagoras' theorem.

T35 The median to the hypotenuse of any right triangle is half as long as the hypotenuse.

Idea of proof . Drop a perpendicular from the midpoint of the hypotenuse to one of the legs. Establish that the right triangle cut off is similar to the original by a factor of 1/2. Then show that the right triangle cut off is congruent to the right triangle whose hyponuse is the median to the hypotenuse of the original triangle.

T36 In any right triangle, the altitude to the hypotenuse forms two right triangles that are similar to each other and to the original triangle.

Hint on Proof: Use the labelled diagram (which theorems do you need to justify the two angles marked with the same number are congruent?)

>

T37 Given a right triangle, the altitude to the hypotenuse divides the hypotenuse into two segments such that the altitude is their geometric mean.

Hint : Call the lengths of the two segments c1 and c2, and call the lenght of the altitude h. Use theorem 36 to set up a proportion to derive the result .

T38 The square of the length of the hypotenuse of a right triangle equals the sum of the squares of the lengths of its legs.

Hint : Make a labelled diagram. Use T 36 to write down several proportions. From some of these derive the pythagorean equation.

>

T39 In a 30 60 degree right triangle, the short leg is half the hypotenuse.

Hint: Reflect the triangle about its long leg (the one opposite the 60 degree angle). See an equilangular triangle anywhere?

T40 For any angle, the sum of the squares of its sine and cosine is 1.

Hint: Use the definition of sine and cosine of an angle and pythagoras' theorem.

T41 In any triangle, the ratio of the length of a side to the sine of the angle opposite it is the same for all three sides.

Hint on proof. Use this labelled diagram. Write b sin(A) = h = a sin(B) and try a little algebra.

T41.5 . In any triangle, the square on the length of a side is the sum of the squares on the lengths of the other two side reduced by twice the product of their lengths and the cosine of the angle between them.

Hint: Make a labelled diagram.