Four Centres of a Triangle
fx-50FH II · CMPLX · 80 bytes
Enter three vertices as complex numbers to obtain the centroid G, circumcentre O, orthocentre H and incentre I, in that order.
- 80 bytes
- CMPLX mode
Worked examples
Example 1
In a Cartesian coordinate plane, A=(−3,2), B=(9,2) and C=(−3,7). Let O and H be the circumcentre and orthocentre of △ABC. Which option gives the correct coordinates?
Answer
Standard solution (without a calculator)
- Recognise the right angle: AB is horizontal and AC is vertical, so ∠BAC=90°. Their lengths are 12 and 5, and BC=√(12²+5²)=13.
- Find O: the circumcentre of a right triangle is the midpoint of its hypotenuse BC. Thus O=((9−3)/2,(2+7)/2)=(3,9/2).
- Find H and choose: the two perpendicular sides are altitudes, so H=A=(−3,2). Only option A has both coordinates correct.
- Check the other centres: G=((−3+9−3)/3,(2+2+7)/3)=(1,11/3). The inradius is (12+5−13)/2=2; the interior point 2 units from each perpendicular side is I=(−1,4).
Example 2
A uniform triangular plate has vertices A(−2,1), B(12,1), C(3,13) in a Cartesian coordinate plane. Let G, O, H, I be its centroid, circumcentre, orthocentre and incentre.
- (a)Find the area and perimeter of △ABC.
- (b)Find G and I.
- (c)Find O and H.
- (d)Prove that G lies on the segment OH and OG:GH=1:2.
Answer
Standard solution (without a calculator)
- Lengths, area and perimeter: AB=14, AC=√(5²+12²)=13 and BC=√(9²+12²)=15. The height above AB is 12, giving Δ=14×12/2=84 and perimeter 42.
- Centroid: G=((−2+12+3)/3,(1+1+13)/3)=(13/3,5).
- Incentre by equal distances: the side lines are y=1, 12x−5y+29=0 and 4x+3y−51=0. For the interior point (u,v), v−1=(12u−5v+29)/13=(51−4u−3v)/5. These give 3v=2u+7 and u+2v=14, so I=(4,5). Its radius is 4, also 2Δ/42.
- Circumcentre: the perpendicular bisector of AB is x=5. With O=(5,v), OA²=OC² gives 49+(v−1)²=4+(v−13)², hence v=41/8 and O=(5,41/8).
- Orthocentre: the altitude from C is x=3. BC has slope −4/3, so the altitude from A is y−1=(3/4)(x+2). At x=3, y=19/4; hence H=(3,19/4).
- Euler-line ratio: G−O=(−2/3,−1/8), while H−G=(−4/3,−1/4)=2(G−O). The vectors have the same direction, so O, G, H lie in that order on a line and OG:GH=1:2.
Example 3
The lines y=1, 3x−4y+16=0 and 3x+4y−16=0 enclose △ABC. A and B lie on y=1, with A left of B; C is the remaining vertex. Let G, O, H, I denote the four centres.
- (a)Find A, B, C and prove that the triangle is obtuse.
- (b)Find G, O, H and I.
- (c)Find the incircle and circumcircle equations, and identify the centres outside the triangle.
Answer
Standard solution (without a calculator)
- Find the vertices: substituting y=1 into the sloping lines gives A=(−4,1), B=(4,1). Solving the two sloping lines together gives C=(0,4).
- Classify the triangle: AB=8 and AC=BC=5. Since 8²>5²+5², the angle ACB is obtuse.
- Use symmetry and the centroid: all four centres lie on the y-axis. G=(0,(1+1+4)/3)=(0,2).
- Circumcentre: put O=(0,v). OA²=OC² gives 16+(v−1)²=(v−4)², hence O=(0,−1/6).
- Orthocentre: the altitude from C is x=0. BC has slope −3/4, so the altitude from A is y−1=(4/3)(x+4). At x=0, H=(0,19/3).
- Incentre: write I=(0,v) inside the triangle. Equal distances to the base and a sloping side give v−1=(16−4v)/5, hence I=(0,7/3) and r=7/3−1=4/3.
- Circle equations and location: the incircle is x²+(y−7/3)²=16/9. Since R=|4−(−1/6)|=25/6, the circumcircle is x²+(y+1/6)²=625/36. The triangle has 1≤y≤4; O has y<1 and H has y>4, so both are outside. G and I are inside.
When to use it
Use this forward calculation when all three numerical vertices of a triangle are known. Each complex number x+yi represents the coordinate pair (x,y); the program returns four complex numbers, with separate component pages on the LCD.
Enter the three vertices
- At A?, M? and C?, enter the first, second and third vertices respectively. M? represents vertex B. Enter (x,y) as x+yi, using ENG for i and (−) for a negative number. For example, (−3,2) becomes −3+2i; (0,4) becomes 4i; (5,0) becomes 5.
- Enter all three values every time, including zeros. A blank EXE retains the current variable value; internal calculations overwrite several variables, so retained values may no longer be vertices.
Read G, O, H and I
- The order is centroid G → circumcentre O → orthocentre H → incentre I. Each result is a coordinate pair, not a separate x-only answer. With R⇔I present and no i, read x; press SHIFTEXE to read y with i.
- When x=0 and y≠0, the first page shows y with i; SHIFTEXE then shows x=0. When y=0, there is no R⇔I and the real value alone gives (x,0). Read the indicators before assigning a coordinate.
- At the G, O and H pauses, ordinary EXE moves to the next centre. Switching component pages does not change Ans. After I, use AC to leave; ordinary EXE runs the program again.
Suitable questions
- HKDSE compulsory mathematics original practice: find numerical triangle centres, check an Euler-line ratio, or use the centres to construct circle equations. If only side equations are given, solve for the vertices first. The program does not supply radii, area, perimeter or a written geometric proof.
Before using the program
- Create the program in CMPLX, select a+bi and Norm 1, and reserve 80 bytes in an empty slot. P1–P4 share 680 bytes. Deg, Rad and Gra do not change this algorithm; the illustrated runs use Deg.
- The vertices must be distinct and noncollinear, with both axes using the same length unit. Repeated or collinear points may first display their arithmetic mean and then cause Math ERROR; that first value does not validate a triangle.
- Avoid almost collinear triangles or very large coordinates with tiny differences. For 0, 1, 1+10⁻⁸i, the exact circumcentre is (1/2,5×10⁻⁹), but the small imaginary component can disappear. Rounding may also leave tiny components that are mathematically zero.
- This compact reciprocal-based version is less accurate for some thin triangles. For A(0,0), B(3000,2999), C(3001,3000), the exact H is (18000000,−18000000), while the displayed components can be about (18000000.38,−18000000.38). Use independent geometry for ill-conditioned data.
- A common coordinate offset of order 10¹³ can erase small side differences and cause Math ERROR. Do not treat these examples as a universal numerical cutoff or set every small component to zero. Round only as the question requires.
- A, M, C, D, X and Ans are overwritten; B and Y are unused. No statistical data or old M/Ans value is needed. This is a forward numerical tool, not a solver for unknown vertices or symbolic parameters.
Checking access…