# Centroid

Centroid of a triangle

In geometry and physics, the centroid or geometric center of a two-dimensional region is, informally, the point at which a cardboard cut-out of the region could be perfectly balanced on the tip of a pencil (assuming uniform density and a uniform gravitational field). Formally, the centroid of a plane figure or two-dimensional shape is the arithmetic mean ("average") position of all the points in the shape. The definition extends to any object in n-dimensional space: its centroid is the mean position of all the points in all of the coordinate directions.

While in geometry the term barycenter is a synonym for "centroid", in physics "barycenter" may also mean the physical center of mass or the center of gravity, depending on the context. The center of mass (and center of gravity in a uniform gravitational field) is the arithmetic mean of all points weighted by the local density or specific weight. If a physical object has uniform density, then its center of mass is the same as the centroid of its shape.

In geography, the centroid of a radial projection of a region of the Earth's surface to sea level is known as the region's geographical center.

## Properties

The geometric centroid of a convex object always lies in the object. A non-convex object might have a centroid that is outside the figure itself. The centroid of a ring or a bowl, for example, lies in the object's central void.

If the centroid is defined, it is a fixed point of all isometries in its symmetry group. In particular, the geometric centroid of an object lies in the intersection of all its hyperplanes of symmetry. The centroid of many figures (regular polygon, regular polyhedron, cylinder, rectangle, rhombus, circle, sphere, ellipse, ellipsoid, superellipse, superellipsoid, etc.) can be determined by this principle alone.

In particular, the centroid of a parallelogram is the meeting point of its two diagonals. This is not true for other quadrilaterals.

For the same reason, the centroid of an object with translational symmetry is undefined (or lies outside the enclosing space), because a translation has no fixed point.

## Locating the centroid

### Plumb line method

The centroid of a uniform planar lamina, such as (a) below, may be determined, experimentally, by using a plumbline and a pin to find the center of mass of a thin body of uniform density having the same shape. The body is held by the pin inserted at a point near the body's perimeter, in such a way that it can freely rotate around the pin; and the plumb line is dropped from the pin (b). The position of the plumbline is traced on the body. The experiment is repeated with the pin inserted at a different point of the object. The intersection of the two lines is the centroid of the figure (c).

|     |     |     |
|-----|-----|-----|
|     |     |     |
| (a) | (b) | (c) |

This method can be extended (in theory) to concave shapes where the centroid lies outside the shape, and to solids (of uniform density), but the positions of the plumb lines need to be recorded by means other than drawing.

### Balancing method

For convex two-dimensional shapes, the centroid can be found by balancing the shape on a smaller shape, such as the top of a narrow cylinder. The centroid occurs somewhere within the range of contact between the two shapes. In principle, progressively narrower cylinders can be used to find the centroid to arbitrary accuracy. In practice air currents make this unfeasible. However, by marking the overlap range from multiple balances, one can achieve a considerable level of accuracy.

### Of a finite set of points

The centroid of a finite set of ${k}$ points $\mathbf{x}_1,\mathbf{x}_2,\ldots,\mathbf{x}_k$ in $\mathbb{R}^n$ is

$\mathbf{C} = \frac{\mathbf{x}_1+\mathbf{x}_2+\cdots+\mathbf{x}_k}{k}$

This point minimizes the sum of squared Euclidean distances between itself and each point in the set.

### By geometric decomposition

The centroid of a plane figure $X$ can be computed by dividing it into a finite number of simpler figures $X_1,X_2,\dots,X_n$, computing the centroid $C_i$ and area $A_i$ of each part, and then computing

$C_x = \frac{\sum C_{i_x} A_i}{\sum A_i} , C_y = \frac{\sum C_{i_y} A_i}{\sum A_i}$

Holes in the figure $X$, overlaps between the parts, or parts that extend outside the figure can all be handled using negative areas $A_i$. Namely, the measures $A_i$ should be taken with positive and negative signs in such a way that the sum of the signs of $A_i$ for all parts that enclose a given point $p$ is 1 if $p$ belongs to $X$, and 0 otherwise.

For example, the figure below (a) is easily divided into a square and a triangle, both with positive area; and a circular hole, with negative area (b).

(a) 2D Object
(b) Object described using simpler elements
(c) Centroids of elements of the object

The centroid of each part can be found in any list of centroids of simple shapes (c). Then the centroid of the figure is the weighted average of the three points. The horizontal position of the centroid, from the left edge of the figure is

$x = \frac{5 \times 10^2 + 13.33 \times \frac{1}{2}10^2 - 3 \times \pi2.5^2}{10^2 + \frac{1}{2}10^2 -\pi2.5^2} \approx 8.5 \mbox{ units}.$

The vertical position of the centroid is found in the same way.

The same formula holds for any three-dimensional objects, except that each $A_i$ should be the volume of $X_i$, rather than its area. It also holds for any subset of $\R^d$, for any dimension $d$, with the areas replaced by the $d$-dimensional measures of the parts.

### By integral formula

The centroid of a subset X of $\R^n$ can also be computed by the integral

$C = \frac{\int x g(x) \; dx}{\int g(x) \; dx}$

where the integrals are taken over the whole space $\R^n$, and g is the characteristic function of the subset, which is 1 inside X and 0 outside it. Note that the denominator is simply the measure of the set X (However, this formula cannot be applied if the set X has zero measure, or if either integral diverges.)

Another formula for the centroid is

$C_k = \frac{\int z S_k(z) \; dz}{\int S_k(z) \; dz}$

where Ck is the kth coordinate of C, and Sk(z) is the measure of the intersection of X with the hyperplane defined by the equation xk = z. Again, the denominator is simply the measure of X.

For a plane figure, in particular, the barycenter coordinates are

$C_{\mathrm x} = \frac{\int x S_{\mathrm y}(x) \; dx}{A}$
$C_{\mathrm y} = \frac{\int y S_{\mathrm x}(y) \; dy}{A}$

where A is the area of the figure X; Sy(x) is the length of the intersection of X with the vertical line at abscissa x; and Sx(y) is the analogous quantity for the swapped axes.

#### Bounded region

The centroid $(\bar{x},\;\bar{y})$ of a region bounded by the graphs of the continuous functions $f$ and $g$ such that $f(x) \geq g(x)$ on the interval $[a, b]$, $a \leq x \leq b$, is given by

$\bar{x}=\frac{1}{A}\int_a^b x[f(x) - g(x)]\;dx$
$\bar{y}=\frac{1}{A}\int_a^b \left[\frac{f(x) + g(x)}{2}\right][f(x) - g(x)]\;dx,$

where $A$ is the area of the region (given by $\int_a^b [f(x) - g(x)]\;dx$).[1]

##### Example

Semicircle with a red dot showing the centroid

Consider the semicircle bounded by $f(x)=\sqrt{1-x^2}$ and $g(x)=0$. Its area is $A=\frac{\pi r^2}{2}=\frac{\pi}{2}$.

$\bar{x}=\frac{1}{A}\int_a^b x[f(x) - g(x)]\;dx=\frac{2}{\pi}\int_{-1}^1 x\sqrt{1-x^2}\;dx=0$
$\bar{y}=\frac{1}{A}\int_a^b \left[\frac{f(x) + g(x)}{2}\right][f(x) - g(x)]\;dx=\frac{2}{\pi}\int_{-1}^1 \left[\frac{\left(\sqrt{1-x^2}\right)^2}{2}\right]\;dx=\frac{4}{3\pi}$

The centroid is located at $(0,\;\frac{4}{3\pi})$.

### Of an L-shaped object

This is a method of determining the centroid of an L-shaped object.

1. Divide the shape into two rectangles, as shown in fig 2. Find the centroids of these two rectangles by drawing the diagonals. Draw a line joining the centroids. The centroid of the shape must lie on this line AB.
2. Divide the shape into two other rectangles, as shown in fig 3. Find the centroids of these two rectangles by drawing the diagonals. Draw a line joining the centroids. The centroid of the L-shape must lie on this line CD.
3. As the centroid of the shape must lie along AB and also along CD, it is obvious that it is at the intersection of these two lines, at O. The point O might not lie inside the L-shaped object.

### Of triangle and tetrahedron

The centroid of a triangle is the point of intersection of its medians (the lines joining each vertex with the midpoint of the opposite side). The centroid divides each of the medians in the ratio 2:1, which is to say it is located ⅓ of the perpendicular distance between each side and the opposing point (see figures at right). Its Cartesian coordinates are the means of the coordinates of the three vertices. That is, if the three vertices are $a = (x_a, y_a)$, $b = (x_b, y_b)$, and $c = (x_c, y_c)$, then the centroid is

$C = \frac13(a+b+c) = \left(\frac13 (x_a+x_b+x_c),\;\; \frac13(y_a+y_b+y_c)\right).$

The centroid is therefore at $\left(\frac13,\frac13,\frac13\right)$ in barycentric coordinates.

The centroid is also the physical center of mass if the triangle is made from a uniform sheet of material; or if all the mass is concentrated at the three vertices, and evenly divided among them. On the other hand, if the mass is distributed along the triangle's perimeter, with uniform linear density, then the center of mass lies at the Spieker center (the incentre of the medial triangle), which does not (in general) coincide with the geometric centroid of the full triangle.

The area of the triangle is 1.5 times the length of any side times the perpendicular distance from the side to the centroid.[2]

A triangle's centroid lies on its Euler line between its orthocenter and its circumcenter, exactly twice as close to the latter as to the former.

Similar results hold for a tetrahedron: its centroid is the intersection of all line segments that connect each vertex to the centroid of the opposite face. These line segments are divided by the centroid in the ratio 3:1. The result generalizes to any n-dimensional simplex in the obvious way. If the set of vertices of a simplex is ${v_0,\ldots,v_n}$, then considering the vertices as vectors, the centroid is

$C = \frac{1}{n+1}\sum_{i=0}^n v_i.$

The geometric centroid coincides with the center of mass if the mass is uniformly distributed over the whole simplex, or concentrated at the vertices as n equal masses.

The isogonal conjugate of a triangle's centroid is its symmedian point.

### Centroid of polygon

The centroid of a non-self-intersecting closed polygon defined by n vertices (x0,y0), (x1,y1), ..., (xn−1,yn−1) is the point (Cx, Cy), where [3]

$C_{\mathrm x} = \frac{1}{6A}\sum_{i=0}^{n-1}(x_i+x_{i+1})(x_i\ y_{i+1} - x_{i+1}\ y_i)$
$C_{\mathrm y} = \frac{1}{6A}\sum_{i=0}^{n-1}(y_i+y_{i+1})(x_i\ y_{i+1} - x_{i+1}\ y_i)$

and where A is the polygon's signed area,

$A = \frac{1}{2}\sum_{i=0}^{n-1} (x_i\ y_{i+1} - x_{i+1}\ y_i)\;$

In these formulas, the vertices are assumed to be numbered in order of their occurrence along the polygon's perimeter, and the vertex ( xn, yn ) is assumed to be the same as ( x0, y0 ). Note that if the points are numbered in clockwise order the area A, computed as above, will have a negative sign; but the centroid coordinates will be correct even in this case.

### Centroid of cone or pyramid

The centroid of a cone or pyramid is located on the line segment that connects the apex to the centroid of the base. For a solid cone or pyramid, the centroid is 1/4 the distance from the base to the apex. For a cone or pyramid that is just a shell (hollow) with no base, the centroid is 1/3 the distance from the base plane to the apex.

## References

1. Larson, Roland E.; Hostetler, Robert P.; Edwards, Bruce H. (1998). Calculus of a Single Variable (Sixth ed.). Houghton Mifflin Company. pp. 458–460.
2. Johnson, Roger A., Advanced Euclidean Geometry, Dover, 2007 (orig. 1929): p. 173, corollary to #272.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 54, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.922995388507843, "perplexity_flag": "head"}