Difficulty: Introductory to Intermediate | Prerequisites: Vector addition, scalar multiplication, midpoint formula
The centroid of a triangle is the point where the three medians meet. This topic introduces you to vector-based proofs in geometry, a skill you will use throughout MATH 215. The centroid has a clean algebraic characterisation (it is the average of the three vertices), a clean vector property (the sum of vectors from the centroid to the vertices is zero), and a clean geometric property (each median is split in a 2:1 ratio). These results generalise naturally to centroids of discrete point sets, which underpin the nearest-centroid classifier, one of the simplest and most intuitive data-classification algorithms. If you are comfortable adding vectors and finding midpoints, you are ready.
The centroid B of a triangle with vertices P1, P2, P3 is the intersection of the three medians, located at (P1 + P2 + P3)/3. It divides each median in a 2:1 ratio (two-thirds from vertex to opposite midpoint). The same averaging idea classifies data points: assign a new point to whichever group's centroid is closest.
Median (of a triangle)
A line segment connecting a vertex of a triangle to the midpoint of the opposite side. Every triangle has exactly three medians.
Think of it as the line from a corner to the middle of the far edge.
Centroid (of a triangle)
The unique point where all three medians intersect. Its coordinates are the arithmetic average of the three vertices: B = (P1 + P2 + P3)/3.
In simple terms, it is the balance point of the triangle. If you cut the triangle out of cardboard, it would balance on a pin placed at the centroid.
Midpoint
The point exactly halfway between two given points. For points P and Q, the midpoint is (P + Q)/2.
2:1 splitting ratio
The centroid divides each median so that the segment from the vertex to the centroid is twice as long as the segment from the centroid to the midpoint of the opposite side.
In simple terms, the centroid sits two-thirds of the way along each median, measured from the vertex.
Centroid (of a discrete point set)
For n points p1, p2, ..., pn, the centroid is the arithmetic mean: c = (p1 + p2 + ... + pn)/n. This generalises the triangle centroid (which is the n = 3 case).
Nearest-centroid classifier
A classification method that assigns a new data point to whichever group has the closest centroid. "Closest" typically means smallest Euclidean distance.
Think of it as: compute the average position of each group, then see which average the new point is nearest to.
Define point B by the vector equation from vertex P3:
P3B = (1/3)(P3P1 + P3P2)
Let C3 be the midpoint of side P1P2. Then:
P3C3 = (1/2)(P3P1 + P3P2), because the midpoint is the average.
So P3B = (2/3) P3C3.
This means B lies on the median from P3 to C3, exactly two-thirds of the way from P3.
To show B also lies on the other two medians, rewrite the same point B in terms of vectors from P2:
P2B = (1/3)(P2P1 + P2P3)
By the same midpoint argument, P2B = (2/3) P2C2, where C2 is the midpoint of P1P3.
The same works from P1. Since B lies on all three medians, it is their common intersection.
This says the vector sum from the centroid to each vertex is the zero vector.
Proof sketch: express each vector BPi in terms of position vectors.
BPi = Pi - B for each i.
BP1 + BP2 + BP3 = (P1 + P2 + P3) - 3B = (P1 + P2 + P3) - 3 x (P1 + P2 + P3)/3 = 0.
Interpretation: the centroid is the "balance point." The pulls toward each vertex cancel out perfectly.
The three medians divide the original triangle into six smaller triangles.
These form three pairs, each pair sharing a vertex at one of the midpoints (C1, C2, or C3).
Each pair can be "hinged" at its shared midpoint and folded together to form a new triangle.
The remarkable result (Question 4 of the homework): all three of these new triangles are congruent, not just similar but identical.
If you repeat the hinge procedure on the new triangle, you get a scaled-down copy of the original.
The proof can be done with coordinates (place P1 at the origin, P2 on the x-axis) or purely geometrically using the 2:1 ratio and side-length calculations.
For n points with coordinates (xi, yi), the centroid is:
cx = (x1 + x2 + ... + xn)/n
cy = (y1 + y2 + ... + yn)/n
This is the natural extension of the triangle centroid to any number of points.
Given labelled groups of data points, compute each group's centroid.
To classify a new unlabelled point, measure its distance to each centroid and assign it to the nearest group.
Worked example from the homework:
Group 1 points: (1,1), (2,2), (1,4), (2,1). Centroid c1 = (1.5, 2).
Group 2 points: (4,1), (6,3), (6,2), (5,3). Centroid c2 = (5.25, 2.25).
Group 3 points: (3,10), (4,8), (5,9). Centroid c3 = (4, 9).
For a new point p1 = (3, 5):
Distance to c1 = sqrt((3-1.5)^2 + (5-2)^2) = sqrt(2.25 + 9) = sqrt(11.25) ≈ 3.35
Distance to c2 = sqrt((3-5.25)^2 + (5-2.25)^2) = sqrt(5.0625 + 7.5625) = sqrt(12.625) ≈ 3.55
Distance to c3 = sqrt((3-4)^2 + (5-9)^2) = sqrt(1 + 16) = sqrt(17) ≈ 4.12
Nearest centroid is c1, so assign p1 to Group 1.
For p2 = (4, 4):
Distance to c1 ≈ 3.20, c2 ≈ 2.64, c3 ≈ 5.00.
Nearest centroid is c2, so assign p2 to Group 2.
Order of classification can matter: if you classify p2 first and add it to Group 2, Group 2's centroid shifts, which could change the classification of p1. In this particular example, the assignments happen to remain the same, but in general, order dependence is a real consideration in iterative classification algorithms like k-means.
B = \frac{P_1 + P_2 + P_3}{3}Centroid of a triangle with vertices P1, P2, P3. Equivalently, B = (1/3)(P1 + P2 + P3) in position-vector form.
\vec{P_3 B} = \frac{2}{3} \vec{P_3 C_3}The centroid lies two-thirds of the way along the median from P3 to the midpoint C3 of the opposite side. The same holds for every median.
\vec{BP_1} + \vec{BP_2} + \vec{BP_3} = \vec{0}The defining vector property of the centroid: the three displacement vectors from B to the vertices sum to zero.
\mathbf{c} = \frac{1}{n} \sum_{i=1}^{n} \mathbf{p}_iCentroid of n discrete points. For 2D points, this is computed coordinate-wise: cx = (sum of all x-coordinates)/n, cy = (sum of all y-coordinates)/n.
d(\mathbf{p}, \mathbf{c}) = \sqrt{(p_x - c_x)^2 + (p_y - c_y)^2}Euclidean distance from a point p to a centroid c, used in nearest-centroid classification.
The centroid is the centre of mass of a uniform triangular plate, which matters in structural engineering and physics whenever you need to know where a flat piece will balance.
Nearest-centroid classification is the simplest form of the k-means family of algorithms, which are used in customer segmentation, image compression, and document clustering. The homework's data-classification problem is a toy version of what recommendation engines and spam filters do with far more dimensions.
Students often confuse the centroid with the circumcentre or the incentre. The centroid is the intersection of medians, not of perpendicular bisectors (circumcentre) or angle bisectors (incentre). These are three different points.
Students sometimes think the centroid divides each median in a 1:1 ratio (i.e. is the midpoint of the median). The correct ratio is 2:1, with the longer segment on the vertex side.
Students occasionally believe that classifying data points in a different order always gives the same result. If you update the centroid after each classification (as in online k-means), the order matters because each new point shifts the centroid before the next point is classified.
Students sometimes assume the nearest-centroid method always gives correct classifications. It is a heuristic. It works well when groups form compact, roughly spherical clusters, but can fail badly when groups overlap or have elongated shapes.
⚠️ The centroid formula B = (P1 + P2 + P3)/3 and the 2:1 ratio are standard exam material. Be able to derive both from the vector definition, not just state them.
⚠️ The property BP1 + BP2 + BP3 = 0 is a quick proof question. Know how to go from the definition of B to this result in two or three lines.
⚠️ The centroid of discrete points will reappear in applications throughout the course (centre of mass, moments). Being fluent with the averaging formula saves time.
⚠️ Nearest-centroid classification is flagged as a "think about it" problem, but the geometric reasoning (compute distances, compare) is exactly the sort of applied-geometry question that appears on exams.
Fill in the blank: The centroid of a triangle divides each median in a ______ ratio, with the longer part on the ______ side.
Answer: 2:1; vertex.
True or False: The centroid of a triangle with vertices (0, 0), (6, 0), and (0, 6) is (3, 3).
Answer: False. It is (2, 2), because (0+6+0)/3 = 2 and (0+0+6)/3 = 2.
Fill in the blank: If B is the centroid of triangle P1P2P3, then BP1 + BP2 + BP3 = ______.
Answer: The zero vector.
True or False: In nearest-centroid classification, you assign a new point to the group whose centroid has the largest distance from the point.
Answer: False. You assign it to the nearest (smallest distance) centroid.
Fill in the blank: The centroid of the points (1, 3), (5, 7), (3, 2), and (7, 4) is (______, ______).
Answer: (4, 4), since (1+5+3+7)/4 = 4 and (3+7+2+4)/4 = 4.
Q: A triangle has vertices P1 = (1, 2), P2 = (5, 8), P3 = (3, -1). Find the centroid.
A: B = ((1+5+3)/3, (2+8-1)/3) = (3, 3).
Q: Using the vector definition, show that the centroid of triangle P1P2P3 lies on the median from P3 to the midpoint of P1P2.
A: Let C3 = (P1 + P2)/2, the midpoint of P1P2. The vector from P3 to B is P3B = B - P3 = (P1 + P2 + P3)/3 - P3 = (P1 + P2 - 2P3)/3. The vector from P3 to C3 is P3C3 = (P1 + P2)/2 - P3 = (P1 + P2 - 2P3)/2. So P3B = (2/3) P3C3, confirming B lies on the median from P3 to C3, two-thirds of the way from P3.
Q: Prove that BP1 + BP2 + BP3 = 0.
A: BPi = Pi - B. Summing: (P1 - B) + (P2 - B) + (P3 - B) = (P1 + P2 + P3) - 3B. Since B = (P1 + P2 + P3)/3, we get 3B = P1 + P2 + P3, so the sum is 0.
Q: Three groups of data points have centroids c1 = (2, 3), c2 = (7, 1), c3 = (5, 8). A new point arrives at (4, 5). Which group should it be assigned to using nearest-centroid classification?
A: Distance to c1 = sqrt((4-2)^2 + (5-3)^2) = sqrt(8) ≈ 2.83. Distance to c2 = sqrt((4-7)^2 + (5-1)^2) = sqrt(25) = 5. Distance to c3 = sqrt((4-5)^2 + (5-8)^2) = sqrt(10) ≈ 3.16. The nearest centroid is c1, so the point is assigned to Group 1.
Q: After assigning a new point to a group, does the group's centroid change? Why does this matter?
A: Yes. Adding a new point shifts the group's centroid toward the new point (the average changes). This matters because if you are classifying multiple new points sequentially, the updated centroid could change the classification of subsequent points. The order of classification can affect the final assignments.
The centroid reappears as the centre of mass in Chapter 15 when you integrate over regions. The vector proof technique (expressing a point as a weighted combination of vertices) is the foundation of barycentric coordinates, which surface in computer graphics and finite element methods.
Nearest-centroid classification leads naturally to k-means clustering, which you may encounter in a statistics or machine learning course. The geometric intuition, that distance in the plane measures similarity, carries over directly.
Related Terms / Search Tags
centroid, median, midpoint, triangle centre, balance point, centre of mass, 2:1 ratio, barycentric coordinates, vector proof, nearest-centroid classifier, k-means, Euclidean distance, data classification, discrete centroid, arithmetic mean, MATH 215, Calculus III, Chapter 12