# Ternary plot

A ternary plot, ternary graph, triangle plot, simplex plot, Gibbs triangle or de Finetti diagram is a barycentric plot on three variables which sum to a constant.[1] It graphically depicts the ratios of the three variables as positions in an equilateral triangle. It is used in physical chemistry, petrology, mineralogy, metallurgy, and other physical sciences to show the compositions of systems composed of three species. In population genetics, a triangle plot of genotype frequencies is called a de Finetti diagram. In game theory, it is often called a simplex plot.[2] Ternary plots are tools for analyzing compositional data in the three-dimensional case.

Approximate colours of Ag–Au–Cu alloys in jewellery making

In a ternary plot, the values of the three variables a, b, and c must sum to some constant, K. Usually, this constant is represented as 1.0 or 100%. Because a + b + c = K for all substances being graphed, any one variable is not independent of the others, so only two variables must be known to find a sample's point on the graph: for instance, c must be equal to Kab. Because the three numerical values cannot vary independently—there are only two degrees of freedom—it is possible to graph the combinations of all three variables in only two dimensions.

The advantage of using a ternary plot for depicting chemical compositions is that three variables can be conveniently plotted in a two-dimensional graph. Ternary plots can also be used to create phase diagrams by outlining the composition regions on the plot where different phases exist.

The values of a point on a ternary plot correspond (up to a constant) to its trilinear coordinates or barycentric coordinates.

Triangular plot of the genetic admixture coefficients of Costa Ricans

## Reading values on a ternary plot

There are three equivalent methods that can be used to determine the values of a point on the plot:

1. Parallel line or grid method. The first method is to use a diagram grid consisting of lines parallel to the triangle edges. A parallel to a side of the triangle is the locus of points constant in the component situated in the vertex opposed to the side. Each component is 100% in a corner of the triangle and 0% at the edge opposite it, decreasing linearly with increasing distance (perpendicular to the opposite edge) from this corner. By drawing parallel lines at regular intervals between the zero line and the corner, fine divisions can be established for easy estimation.
2. Perpendicular line or altitude method. For diagrams that do not possess grid lines, the easiest way to determine the values is to determine the shortest (i.e. perpendicular) distances from the point of interest to each of the three sides. By Viviani's theorem, the distances (or the ratios of the distances to the triangle height) give the value of each component.
3. Corner line or intersection method. The third method does not require the drawing of perpendicular or parallel lines. Straight lines are drawn from each corner, through the point of interest, to the opposite side of the triangle. The lengths of these lines, as well as the lengths of the segments between the point and the corresponding sides, are measured individually. The ratio of the measured lines then gives the component value as a fraction of 100%.

Note that a displacement along a parallel line (grid line) preserves the sum of two values, while motion along a perpendicular line increases (or decreases) the two values an equal amount, each half of the decrease (increase) of the third value. Motion along a line through a corner preserves the ratio of the other two values.

## Derivation from Cartesian coordinates

Derivation of a ternary plot from Cartesian coordinates

Figure (1) shows an oblique projection of point P(a,b,c) in a 3-dimensional Cartesian space with axes a, b and c, respectively.

If a + b + c = K (a positive constant), P is restricted to a plane containing A(K,0,0), B(0,K,0) and C(0,0,K). If a, b and c each cannot be negative, P is restricted to the triangle bounded by A, B and C, as in (2).

In (3), the axes are rotated to give an isometric view. The triangle, viewed face-on, appears equilateral.

In (4), the distances of P from lines BC, AC and AB are denoted by a, b and c, respectively.

For any line l = s + t in vector form ( is a unit vector) and a point p, the perpendicular distance from p to l is

${\displaystyle \left\|(\mathbf {s} -\mathbf {p} )-{\bigl (}(\mathbf {s} -\mathbf {p} )\cdot \mathbf {\hat {n}} {\bigr )}\mathbf {\hat {n}} \right\|\,.}$

In this case, point P is at

${\displaystyle \mathbf {p} ={\begin{pmatrix}a\\b\\c\end{pmatrix}}\,.}$

Line BC has

${\displaystyle \mathbf {s} ={\begin{pmatrix}0\\K\\0\end{pmatrix}}\quad {\text{and}}\quad \mathbf {\hat {n}} ={\frac {{\begin{pmatrix}0\\K\\0\end{pmatrix}}-{\begin{pmatrix}0\\0\\K\end{pmatrix}}}{\left\|{\begin{pmatrix}0\\K\\0\end{pmatrix}}-{\begin{pmatrix}0\\0\\K\end{pmatrix}}\right\|}}={\frac {\begin{pmatrix}0\\K\\-K\end{pmatrix}}{\sqrt {0^{2}+K^{2}+{(-K)}^{2}}}}={\begin{pmatrix}0\\{\frac {1}{\sqrt {2}}}\\-{\frac {1}{\sqrt {2}}}\end{pmatrix}}\,.}$

Using the perpendicular distance formula,

{\displaystyle {\begin{aligned}a'&=\left\|{\begin{pmatrix}-a\\K-b\\-c\end{pmatrix}}-\left({\begin{pmatrix}-a\\K-b\\-c\end{pmatrix}}\cdot {\begin{pmatrix}0\\{\frac {1}{\sqrt {2}}}\\-{\frac {1}{\sqrt {2}}}\end{pmatrix}}\right){\begin{pmatrix}0\\{\frac {1}{\sqrt {2}}}\\-{\frac {1}{\sqrt {2}}}\end{pmatrix}}\right\|\\[10px]&=\left\|{\begin{pmatrix}-a\\K-b\\-c\end{pmatrix}}-\left(0+{\frac {K-b}{\sqrt {2}}}+{\frac {c}{\sqrt {2}}}\right){\begin{pmatrix}0\\{\frac {1}{\sqrt {2}}}\\-{\frac {1}{\sqrt {2}}}\end{pmatrix}}\right\|\\[10px]&=\left\|{\begin{pmatrix}-a\\K-b-{\frac {K-b+c}{2}}\\-c+{\frac {K-b+c}{2}}\end{pmatrix}}\right\|=\left\|{\begin{pmatrix}-a\\{\frac {K-b-c}{2}}\\{\frac {K-b-c}{2}}\end{pmatrix}}\right\|\\[10px]&={\sqrt {{(-a)}^{2}+{\left({\frac {K-b-c}{2}}\right)}^{2}+{\left({\frac {K-b-c}{2}}\right)}^{2}}}={\sqrt {a^{2}+{\frac {{(K-b-c)}^{2}}{2}}}}\,.\end{aligned}}}

Substituting K = a + b + c,

${\displaystyle a'={\sqrt {a^{2}+{\frac {{(a+b+c-b-c)}^{2}}{2}}}}={\sqrt {a^{2}+{\frac {a^{2}}{2}}}}=a{\sqrt {\frac {3}{2}}}\,.}$

Similar calculation on lines AC and AB gives

${\displaystyle b'=b{\sqrt {\frac {3}{2}}}\quad {\text{and}}\quad c'=c{\sqrt {\frac {3}{2}}}\,.}$

This shows that the distance of the point from the respective lines is linearly proportional to the original values a, b and c.[3]

## Plotting a ternary plot

Analogue on a Cartesian grid by adding lines of slope −1. The scale of the c axis is ${\textstyle {\frac {1}{\sqrt {2}}}}$ that of the a and b axes. The cross denotes the point a = b = c.

Cartesian coordinates are useful for plotting points in the triangle. Consider an equilateral ternary plot where a = 100% is placed at (x,y) = (0,0) and b = 100% at (1,0). Then c = 100% is ${\textstyle ({\frac {1}{2}},{\frac {\sqrt {3}}{2}}),}$ and the triple (a,b,c) is

${\displaystyle \left({\frac {1}{2}}\cdot {\frac {2b+c}{a+b+c}},{\frac {\sqrt {3}}{2}}\cdot {\frac {c}{a+b+c}}\right)\,.}$

## Example

This example shows how this works for a hypothetical set of three soil samples:

Sample Clay Silt Sand Notes
Sample 1 50% 20% 30% Because clay and silt together make up 70% of this sample, the proportion of sand must be 30% for the components to sum to 100%.
Sample 2 10% 60% 30% The proportion of sand is 30% as in Sample 1, but as the proportion of silt rises by 40%, the proportion of clay decreases correspondingly.
Sample 3 10% 30% 60% This sample has the same proportion of clay as Sample 2, but the proportions of silt and sand are swapped; the plot is reflected about its vertical axis.