Exploring Analyic Geometry with Mathematica®

Home Contents Commands Packages Explorations Reference
Tour Lines Circles Conics Analysis Tangents

Triangles

Definitions
Centroid of a Triangle
Circumscribed Circle
Inscribed Circle
Solving Triangles
Cevian Lengths
Explorations

Even though a triangle is not easily represented by a single, simple equation, there exist so many interesting properties of triangles that it is worth devoting a special chapter to them. Even today, new relationships involving triangles continue to be discovered. Descarta2D implements the triangle as a named object to enable easy study of the mathematical relationships arising from the geometry of a triangle.

Initialize

To initialize Descarta2D, select the input cell bracket and press SHIFT-Enter.

This initialization assumes that the Descarta2D software has been copied into one of the standard directories for AddOns which are on the Mathematica search path, $Path.

<<Descarta2D`

Definitions [Top]

A triangle is a composite object consisting of the three line segments connecting three non-collinear points. The line segments are called the sides of the triangle, and the points are called the vertices of the triangle. The two line segments adjacent to each vertex form an angle inside the triangle called a vertex angle.

A triangle is isosceles if two sides are equal in length, and the third side is called the base. In an equilateral triangle all three sides are equal length. A triangle is called acute if all the interior angles measure less than "tri_1.gif". A right triangle has one interior angle of "tri_2.gif", and the side opposite the right angle is called the hypotenuse. A triangle with an interior angle greater than "tri_3.gif" is called an obtuse triangle. A triangle with three unequal sides is a scalene triangle. It is clear from Figure [tri:fig07] that the sum of the interior angles of a triangle is 180 degrees (π radians).

"tri_4.gif"

Sum of triangle interior angles.

Example: Plot the triangle connecting the points (-1,-1), (2,0) and (-2,1). Use Descarta2D functions to retrieve the vertex points and vertex angles of the triangle (in degrees).

Solution: In Descarta2D a triangle is represented as

Triangle2D[coords"tri_5.gif",coords"tri_6.gif",coords"tri_7.gif"]

where coords"tri_8.gif", coords"tri_9.gif" and coords"tri_10.gif" are the coordinates of the first, second and third vertex points, respectively. The Descarta2D function Point2D[triangle,n] returns a point located at vertex n of the triangle. Angle2D[triangle,n] returns the vertex angle at vertex n of the triangle.

t1=Triangle2D[{-1,-1},{2,0},{-2,1}];
{Map[Point2D[t1,#]&,{1,2,3}],
Map[Angle2D[t1,#]&,{1,2,3}]/Degree //N}

"tri_11.gif"

Sketch2D[{t1}]

"tri_12.gif"

Example: Given the lines 2x-3y+4=0, -4x+2y+2=0 and 4x+5y-2=0 construct the triangle whose sides lie on the lines.

Solution: The Descarta2D function Triangle2D[line,line,line] returns a triangle defined by three lines.

l1=Line2D[2,-3,4];
l2=Line2D[-4,2,2];
l3=Line2D[4,5,-2];
t1=Triangle2D[l1,l2,l3]

"tri_13.gif"

pr=PlotRange->{{-2,3},{-1,3}};
{Sketch2D[{l1,l2,l3},pr],Sketch2D[{t1},pr]}

"tri_14.gif"

Example: Find the line segment and the line associated with the side connecting vertices 2 and 3 of Triangle2D[{2,3},{-1,2},{-3,2}].

Solution: The Descarta2D function Segment2D[triangle,"tri_15.gif","tri_16.gif"] returns the line segment connecting two vertices of a triangle. Line2D[triangle,"tri_17.gif","tri_18.gif"] returns the line containing the side of a triangle through two vertices.

t1=Triangle2D[{2,3},{-1,2},{-3,2}];
{Segment2D[t1,2,3],Line2D[t1,2,3]}

"tri_19.gif"

Centroid of a Triangle [Top]

The "balance point" of a planar area defined by bounding curves is called the center of gravity of the area. When the material covering the area has a constant density throughout, and the formulas for the center of gravity depend purely on the size and shape of the area, the center of gravity is called the centroid of the area. For symmetric geometric figures such as a square, circle or ellipse, the centroid is obviously the center point of the figure.

"tri_20.gif"

Centroid of a triangle.

Referring to Figure [tri:fig08] it is intuitively obvious that the triangle will "balance" on some horizontal line at ordinate "tri_21.gif". The position of this line can be determined by summing the moments, "tri_22.gif", of infinitesimal rectangles on either side of the line. The value of "tri_23.gif" is the ordinate at which the sum of the moments is equal on both sides of the line. The usual method for determining "tri_24.gif" is to use integral calculus and the actual derivation is included as the exploration tricent.html. The derivation shows that the line is one-third of the distance from the base of the triangle to the apex, and the coordinates of the centroid, P, of the triangle are given by

"tri_25.gif"

where "tri_26.gif", "tri_27.gif" and "tri_28.gif" are the coordinates of the triangle's vertex points. The centroid point coordinates can be determined by intersecting a pair of lines offset from the sides of the triangle one-third of the distance from the side towards the opposite vertex.

The medians of a triangle are the lines connecting the vertices to the midpoints of the opposite sides. The medians taken in pairs intersect in coincident points, and the point is the centroid of the triangle as is shown by the following Descarta2D commands:

Clear[x1,y1,x2,y2,x3,y3];
p1=Point2D[{x1,y1}];
p2=Point2D[{x2,y2}];
p3=Point2D[{x3,y3}];
pt1=Point2D[Line2D[p1,Point2D[p2,p3]],
            Line2D[p2,Point2D[p1,p3]]]//Simplify

"tri_29.gif"

Example: Find the centroid of the triangle whose vertices are (-2,-1), (3,1), and (0,2). Show by plotting that the medians intersect at the centroid.

Solution: The Descarta2D function Point2D[triangle,Centroid2D] returns the centroid point of a triangle.

t1=Triangle2D[{-2,-1},{3,1},{0,2}];
pt=Point2D[t1,Centroid2D]

"tri_30.gif"

{c1,c2,c3}={{-2,-1},{3,1},{0,2}};
s12=Segment2D[c1,c2];
s13=Segment2D[c1,c3];
s23=Segment2D[c2,c3];
m1=Segment2D[Point2D[c1],Point2D[s23]];
m2=Segment2D[Point2D[c2],Point2D[s13]];
m3=Segment2D[Point2D[c3],Point2D[s12]];

Sketch2D[{t1,pt,m1,m2,m3}]

"tri_31.gif"

Circumscribed Circle [Top]

A circle passing through the three vertex points of a triangle is said to be circumscribed about the triangle. We have already provided in a previous chapter the equation of a circle passing through three points. Since the sides of the triangle are chords of the circle, and the perpendicular bisectors of the chords of a circle intersect at the center point, the center of the circumscribed circle is the intersection point of the perpendicular bisectors of the triangle's sides taken in pairs.

Example: Find the circle circumscribing the triangle whose vertices are (1,2), (-2,4) and (-3,1). Show by plotting that the perpendicular bisectors of the sides of the triangle intersect at the center point of the circumscribed circle.

Solution: The function Circle2D[triangle,Circumscribed2D] returns the circle that circumscribes the triangle.

p1=Point2D[{1,2}];
p2=Point2D[{-2,4}];
p3=Point2D[{-3,1}];
t1=Triangle2D[p1,p2,p3];
c1=Circle2D[t1,Circumscribed2D] //N

"tri_32.gif"

Sketch2D[{p1,p2,p3,t1,c1,Point2D[c1],
   Line2D[p1,p2,Perpendicular2D],
   Line2D[p1,p3,Perpendicular2D],
   Line2D[p2,p3,Perpendicular2D]}]

"tri_33.gif"

Descarta2D Hint: Point2D[triangle,Circumscribed2D] directly returns the center point of the circumscribed circle of a triangle.

The radius, R, of the circle circumscribing a triangle whose sides are of length "tri_34.gif", "tri_35.gif" and "tri_36.gif" is given by

"tri_37.gif"

where "tri_38.gif" and "tri_39.gif". This formula is derived in the exploration trirad.html.

Inscribed Circle [Top]

A circle inside a triangle that is tangent to all three of the triangle's sides is said to be inscribed in the triangle. The center of the inscribed circle must lie on the angle bisectors of the triangle's sides because the center must be equidistant from the sides. Therefore, the point of intersection of a pair of angle bisectors of a triangle is the center of the inscribed circle. The radius of the inscribed circle is the distance from the center point to any one of the triangle's sides. The center (h,k) and radius r of the inscribed circle derived from this construction yields

h = "tri_40.gif"
k = "tri_41.gif"
r = "tri_42.gif"

where

"tri_43.gif" = "tri_44.gif"
"tri_45.gif" = "tri_46.gif"
"tri_47.gif" = "tri_48.gif"
s = "tri_49.gif"

Example: Find the circle inscribed in the triangle whose vertices are (-3,3), (3,3) and (1,-3). Show by plotting that the angle bisectors of the sides of the triangle intersect at the center of the inscribed circle.

Solution: The function Circle2D[triangle,Inscribed2D] returns the circle inscribed in the triangle.

p1=Point2D[{-3,3}];
p2=Point2D[{3,3}];
p3=Point2D[{1,-3}];
t1=Triangle2D[p1,p2,p3];
c1=Circle2D[t1,Inscribed2D] //N

"tri_50.gif"

Sketch2D[{p1,p2,p3,t1,c1,Point2D[c1],
   MedialEquations2D[{Line2D[p1,p2],Line2D[p1,p3]}][[2]],
   MedialEquations2D[{Line2D[p2,p3],Line2D[p2,p1]}][[2]],
   MedialEquations2D[{Line2D[p3,p1],Line2D[p3,p2]}][[2]]}]

"tri_51.gif"

Descarta2D Hint: The function Point2D[triangle,Inscribed2D] directly returns the center point of the inscribed circle of a triangle.

The radius, r, of a circle inscribed in a triangle whose sides are of length "tri_52.gif", "tri_53.gif" and "tri_54.gif" is given by

"tri_55.gif"

where "tri_56.gif" and "tri_57.gif". This formula is derived in the exploration trirad.html.

Solving Triangles [Top]

Clearly, the shape of a triangle, independent of its position and orientation, is determined by its side lengths and vertex angle magnitudes. Labeling the sides and angles as shown in Figure [tri:fig09] relative to the vertices, we pose the problem of determining all of the configuration parameters ("tri_58.gif" and "tri_59.gif") given a subset of them. The configuration parameters are always assumed to be positive and the angles less than π radians. Generally, a unique triangle is determined by specifying three of the six configuration parameters, although in two cases (AAA and SSA), as outlined below, the configuration is ambiguous. The configurations requiring consideration are enumerated as

"tri_60.gif"

Standard labeling of a triangle's sides and angles.

   AAA  Angle-Angle-Angle: Specifying three angles of a triangle determines the shape of a family of similar triangles, but is ambiguous as to the lengths of the sides.

   AAS  Angle-Angle-Side: The AAS configuration is specified by two angles and a side not between them. For example, the configuration parameters "tri_61.gif", "tri_62.gif" and "tri_63.gif" specify an AAS configuration. In a valid configuration the sum of the two given angles must be less than π radians, and such configurations admit a unique solution.

   ASA  Angle-Side-Angle: The ASA configuration is specified by two angles and the side between the angles. The configuration parameters "tri_64.gif", "tri_65.gif" and "tri_66.gif", for example, illustrate an ASA configuration. The ASA configuration allows a unique solution if the sum of the two angles is less than π radians.

   SAS  Side-Angle-Side: The SAS configuration involves two sides and the angle between them. The configuration given by "tri_67.gif", "tri_68.gif" and "tri_69.gif" is an example of an SAS configuration. The SAS configuration specifies a unique solution for all values of the configuration parameters.

   SSA  Side-Side-Angle: SSA configurations ("tri_70.gif", "tri_71.gif" and "tri_72.gif", for example) are referred to as the ambiguous case, because two valid solutions may exist. That is, two different sets of configuration parameters representing two different triangles may satisfy the configuration. In some cases (right triangles) only one solution may exist, and in other cases the configuration may be inconsistent allowing no solutions.

   SSS  Side-Side-Side: Specifying three sides of a triangle determines a unique triangle, or may be inconsistent if the length of one side is greater than or equal to the sum of the lengths of the other two sides.

The process of determining the full set of configuration parameters given one of the cases above is called solving the triangle. Solving triangles involves the application of three fundamental principles. In terms of the configuration parameters these three principles lead to the following equations:

Sum of the angles of a triangle is π radians: "tri_73.gif".

The Law of Sines (three equations):

"tri_74.gif"

The Law of Cosines (three equations):

"tri_75.gif" = "tri_76.gif"
"tri_77.gif" = "tri_78.gif"
"tri_79.gif" = "tri_80.gif"

When applying the Law of Sines or the Law of Cosines, care must be taken to properly handle the ambiguous cases noting that sin(a)=sin(π-a), for example, when applying the Law of Sines. The Descarta2D package D2DTriangle2D provides details illustrating how to solve all the triangle configuration cases using these principles.

Example: Find all the configuration parameters for a triangle with "tri_81.gif", "tri_82.gif" and "tri_83.gif" radians. Construct a triangle satisfying this SAS configuration.

Solution: SolveTriangle2D[{{"tri_84.gif","tri_85.gif","tri_86.gif"},{"tri_87.gif","tri_88.gif","tri_89.gif"}}] returns a complete specification a triangle configuration, in the form {{"tri_90.gif","tri_91.gif","tri_92.gif"},{"tri_93.gif","tri_94.gif","tri_95.gif"}}, given three of the six configuration parameters. The three parameters to be found must be omitted (i.e. entered as Null in the configuration). The function Triangle2D[config] returns the triangle satisfying the configuration. The first vertex of the triangle will be the origin and the second vertex will be on the +x-axis.

sa=SolveTriangle2D[{{1,2,Null},
                    {Null,Null,Pi/6}}] //Simplify

"tri_96.gif"

Triangle2D[sa] //Simplify

"tri_97.gif"

Descarta2D Hint: Triangle2D[{"tri_98.gif","tri_99.gif","tri_100.gif"}] constructs a triangle given the lengths of the sides only.

Example: Find all configuration parameters for a triangle with "tri_101.gif", "tri_102.gif" and "tri_103.gif" radians (an SSA case).

Solution: The function SolveTriangle2D[config] returns a complete triangle configuration given a partial configuration. Since this is an SSA case, there is a possibility of two solutions. SolveTriangle2D[config,True] will return the alternate triangle configuration, if one exists.

SolveTriangle2D[{{1,1.5,Null},
                 {Pi/6.,Null,Null}}]

"tri_104.gif"

"tri_105.gif"

SolveTriangle2D[{{1,1.5,Null},
                 {Pi/6.,Null,Null}},True]

"tri_106.gif"

"tri_107.gif"

{Sketch2D[{Triangle2D[{{1,1.5,Null},
                       {Pi/6.,Null,Null}}]}],
Sketch2D[{Triangle2D[{{1,1.5,Null},
                       {Pi/6.,Null,Null}},True]}]}

"tri_108.gif"

"tri_109.gif"

"tri_110.gif"

Cevian Lengths [Top]

A cevian of a triangle is a line segment connecting a vertex to a point on the line containing the side of the triangle opposite the vertex. Therefore a cevian may be inside the triangle (if the point is on the opposite side) or it may be outside the triangle (if the point is on the extension of the line which contains the opposite side). Common cevians include the altitude of a triangle which is the cevian perpendicular to the opposite side, the median which connects the vertex to the midpoint of the opposite side and the angle bisector which bisects the angle at the vertex.

If a triangle has sides whose lengths are "tri_111.gif", "tri_112.gif" and "tri_113.gif" opposite vertices "tri_114.gif", "tri_115.gif" and "tri_116.gif", then the length of the altitude, "tri_117.gif", from "tri_118.gif" is given by

"tri_119.gif"

where "tri_120.gif" and "tri_121.gif". The length of the median, "tri_122.gif", from vertex "tri_123.gif" is given by

"tri_124.gif"

The length of the angle bisector, "tri_125.gif", from "tri_126.gif" is given by

"tri_127.gif"

The formulas for the lengths of the cevians from vertices "tri_128.gif" and "tri_129.gif" can be found by cyclic permutation of the subscripts given in the formulas above. The derivations of these formulas are provided in the exploration tricev.html.

Explorations [Top]

Circle Inscribed in a Right Triangle. [rttricir.html]

Show that if r is the radius of a circle inscribed in a right triangle with sides a and b and hypotenuse c, then "tri_130.gif".

Euler's Triangle Formula. [trieuler.html]

If T is a triangle, and P and r are the center and radius of the circle inscribed in T, and Q and R are the center and radius of the circle circumscribing T, show that

"tri_131.gif"

where d is the distance from P to Q.

Gergonne Point of a Triangle. [gergonne.html]

Let "tri_132.gif", "tri_133.gif" and "tri_134.gif" be the points of contact of the inscribed circle of triangle "tri_135.gif" with sides "tri_136.gif", "tri_137.gif" and "tri_138.gif", respectively. Show that lines "tri_139.gif", "tri_140.gif" and "tri_141.gif" are concurrent. The point of concurrency is called the Gergonne Point of the triangle after J.D. Gergonne (1771-1859), founder-editor of the mathematics journal Annales de Mathematiques.

Centroid of a Triangle. [tricent.html]

"tri_142.gif"

Show that the centroid of a triangle, as illustrated in the figure, is on a line at a distance "tri_143.gif" from the base of the triangle.

Altitude of a Triangle. [trialt.html]

The altitude from vertex A of △ABC is a line segment from A perpendicular to the side BC (or its extension). Show that the equation of the line containing the altitude from A is

"tri_144.gif"

where the coordinates of the vertices are "tri_145.gif", "tri_146.gif" and "tri_147.gif".

Triangle Altitude Length. [triallen.html]

Show that the length, L, of a triangle's altitude (from vertex "tri_148.gif" to side "tri_149.gif") is given by

"tri_150.gif"

where "tri_151.gif", "tri_152.gif" and "tri_153.gif" are the lengths of the triangle's sides.

Concurrent Triangle Altitudes. [triconn.html]

Show that the three altitudes of any △ABC are concurrent in a single point (x,y) whose coordinates are given by

"tri_154.gif"

where

x' = "tri_155.gif"
y' = "tri_156.gif"

and

"tri_157.gif"

and the coordinates of the vertices are "tri_158.gif", "tri_159.gif" and "tri_160.gif". This point is called the orthocenter of the triangle.

Triangle Side Lengths from Altitudes. [trisides.html]

Prove that the lengths of a triangle's sides whose altitudes are of lengths "tri_161.gif", "tri_162.gif" and "tri_163.gif" are given by

"tri_164.gif"

where "tri_165.gif", "tri_166.gif" and "tri_167.gif", and

"tri_168.gif"

Triangle Radii. [trirad.html]

Prove that the radius, r, of a circle inscribed in a triangle is given by

"tri_169.gif"

where "tri_170.gif", "tri_171.gif" and "tri_172.gif", "tri_173.gif" and "tri_174.gif" are the lengths of the triangle's sides. Furthermore, prove that the radius, R, of the circle circumscribing the triangle is given by

"tri_175.gif"

Triangle Cevian Lengths. [tricev.html]

Prove that the length of the altitude, "tri_176.gif", from vertex "tri_177.gif" of a triangle to the opposite side of the triangle (whose length is "tri_178.gif") is given by

"tri_179.gif"

where "tri_180.gif" and "tri_181.gif". Prove that the length of the median, "tri_182.gif", from vertex "tri_183.gif" is given by

"tri_184.gif"

Prove that the length of the angle bisector, "tri_185.gif", from "tri_186.gif" is given by

"tri_187.gif"

Also show that the formulas for the lengths of the cevians from vertices "tri_188.gif" and "tri_189.gif" can be found by cyclic permutation of the subscripts given in the formulas above.


Copyright © 1999-2007 Donald L. Vossler, Descarta2D Publishing
www.Descarta2D.com