# Triangle calculator

You have entered side a, c and angle α.

Triangle has two solutions: a=6.3; b=3.30110726037; c=9.3 and a=6.3; b=14.17772101429; c=9.3.

### #1 Obtuse scalene triangle.

Sides: a = 6.3   b = 3.30110726037   c = 9.3

Area: T = 5.25500049615
Perimeter: p = 18.90110726037
Semiperimeter: s = 9.45105363019

Angle ∠ A = α = 20° = 0.34990658504 rad
Angle ∠ B = β = 10.32438433776° = 10°19'26″ = 0.18801850584 rad
Angle ∠ C = γ = 149.6766156622° = 149°40'34″ = 2.61223417448 rad

Height: ha = 1.66766682417
Height: hb = 3.18107873329
Height: hc = 1.12990333251

Median: ma = 6.22766395566
Median: mb = 7.77695385909
Median: mc = 1.91659958684

Vertex coordinates: A[9.3; 0] B[0; 0] C[6.19880064336; 1.12990333251]
Centroid: CG[5.16660021445; 0.37663444417]
Coordinates of the circumscribed circle: U[4.65; -7.95499246984]
Coordinates of the inscribed circle: I[6.14994636981; 0.55655245537]

Exterior (or external, outer) angles of the triangle:
∠ A' = α' = 160° = 0.34990658504 rad
∠ B' = β' = 169.6766156622° = 169°40'34″ = 0.18801850584 rad
∠ C' = γ' = 30.32438433776° = 30°19'26″ = 2.61223417448 rad

# How did we calculate this triangle?

The calculation of the triangle progress in two phases. The first phase is such that we try to calculate all three sides of the triangle from the input parameters. The first phase is different for the different triangles query entered. The second phase is the calculation of other characteristics of the triangle, such as angles, area, perimeter, heights, the center of gravity, circle radii, etc. Some input data also results in two to three correct triangle solutions (e.g., if the specified triangle area and two sides - typically resulting in both acute and obtuse) triangle).

### 1. Input data entered: side a, c and angle α.

$a = 6.3 \ \\ c = 9.3 \ \\ α = 20^\circ$

### 2. From angle α, side c and side a we calculate side b - by using the law of cosines and quadratic equation:

$a^2 = c^2 + b^2 - 2c b \cos α \ \\ \ \\ 6.3^2 = 9.3^2 + b^2 - 2 \cdot \ 9.3 \cdot \ b \cdot \ \cos 20^\circ \ \\ \ \\ \ \\ b^2 -17.478b +46.8 =0 \ \\ \ \\ p=1; q=-17.478; r=46.8 \ \\ D = q^2 - 4pr = 17.478^2 - 4\cdot 1 \cdot 46.8 = 118.290367771 \ \\ D>0 \ \\ \ \\ b_{1,2} = \dfrac{ -q \pm \sqrt{ D } }{ 2p } = \dfrac{ 17.48 \pm \sqrt{ 118.29 } }{ 2 } \ \\ b_{1,2} = 8.73914137 \pm 5.43806876958 \ \\ b_{1} = 14.1772101429 \ \\ b_{2} = 3.30107260373 \ \\ \ \\ \text{ Factored form of the equation: } \ \\ (b -14.1772101429) (b -3.30107260373) = 0 \ \\ \ \\ \ \\ b > 0 \ \\ \ \\ b = 14.177$

Now we know the lengths of all three sides of the triangle, and the triangle is uniquely determined. Next, we calculate another its characteristics - same procedure as calculation of the triangle from the known three sides SSS.

$a = 6.3 \ \\ b = 3.3 \ \\ c = 9.3$

### 3. The triangle perimeter is the sum of the lengths of its three sides

$p = a+b+c = 6.3+3.3+9.3 = 18.9$

### 4. Semiperimeter of the triangle

The semiperimeter of the triangle is half its perimeter. The semiperimeter frequently appears in formulas for triangles that it is given a separate name. By the triangle inequality, the longest side length of a triangle is less than the semiperimeter.

$s = \dfrac{ p }{ 2 } = \dfrac{ 18.9 }{ 2 } = 9.45$

### 5. The triangle area using Heron's formula

Heron's formula gives the area of a triangle when the length of all three sides are known. There is no need to calculate angles or other distances in the triangle first. Heron's formula works equally well in all cases and types of triangles.

$T = \sqrt{ s(s-a)(s-b)(s-c) } \ \\ T = \sqrt{ 9.45(9.45-6.3)(9.45-3.3)(9.45-9.3) } \ \\ T = \sqrt{ 27.56 } = 5.25$

### 6. Calculate the heights of the triangle from its area.

There are many ways to find the height of the triangle. The easiest way is from the area and base length. The area of a triangle is half of the product of the length of the base and the height. Every side of the triangle can be a base; there are three bases and three heights (altitudes). Triangle height is the perpendicular line segment from a vertex to a line containing the base.

$T = \dfrac{ a h _a }{ 2 } \ \\ \ \\ h _a = \dfrac{ 2 \ T }{ a } = \dfrac{ 2 \cdot \ 5.25 }{ 6.3 } = 1.67 \ \\ h _b = \dfrac{ 2 \ T }{ b } = \dfrac{ 2 \cdot \ 5.25 }{ 3.3 } = 3.18 \ \\ h _c = \dfrac{ 2 \ T }{ c } = \dfrac{ 2 \cdot \ 5.25 }{ 9.3 } = 1.13$

### 7. Calculation of the inner angles of the triangle using a Law of Cosines

The Law of Cosines is useful for finding the angles of a triangle when we know all three sides. The cosine rule, also known as the law of cosines, relates all three sides of a triangle with an angle of a triangle. The Law of Cosines is the extrapolation of the Pythagorean theorem for any triangle. Pythagorean theorem works only in a right triangle. Pythagorean theorem is a special case of the Law of Cosines and can be derived from it because the cosine of 90° is 0. It is best to find the angle opposite the longest side first. With the Law of Cosines, there is also no problem with obtuse angles as with the Law of Sines, because cosine function is negative for obtuse angles, zero for right, and positive for acute angles. We also use inverse cosine called arccosine to determine the angle from cosine value.

$a^2 = b^2+c^2 - 2bc \cos α \ \\ \ \\ α = \arccos(\dfrac{ b^2+c^2-a^2 }{ 2bc } ) = \arccos(\dfrac{ 3.3^2+9.3^2-6.3^2 }{ 2 \cdot \ 3.3 \cdot \ 9.3 } ) = 20^\circ \ \\ \ \\ b^2 = a^2+c^2 - 2ac \cos β \ \\ β = \arccos(\dfrac{ a^2+c^2-b^2 }{ 2ac } ) = \arccos(\dfrac{ 6.3^2+9.3^2-3.3^2 }{ 2 \cdot \ 6.3 \cdot \ 9.3 } ) = 10^\circ 19'26" \ \\ γ = 180^\circ - α - β = 180^\circ - 20^\circ - 10^\circ 19'26" = 149^\circ 40'34"$

An incircle of a triangle is a circle which is tangent to each side. An incircle center is called incenter and has a radius named inradius. All triangles have an incenter, and it always lies inside the triangle. The incenter is the intersection of the three angle bisectors. The product of the inradius and semiperimeter (half the perimeter) of a triangle is its area.

$T = rs \ \\ r = \dfrac{ T }{ s } = \dfrac{ 5.25 }{ 9.45 } = 0.56$

The circumcircle of a triangle is a circle that passes through all of the triangle's vertices, and the circumradius of a triangle is the radius of the triangle's circumcircle. Circumcenter (center of circumcircle) is the point where the perpendicular bisectors of a triangle intersect.

$R = \dfrac{ a b c }{ 4 \ r s } = \dfrac{ 6.3 \cdot \ 3.3 \cdot \ 9.3 }{ 4 \cdot \ 0.556 \cdot \ 9.451 } = 9.21$

### 10. Calculation of medians

A median of a triangle is a line segment joining a vertex to the midpoint of the opposite side. Every triangle has three medians, and they all intersect each other at the triangle's centroid. The centroid divides each median into parts in the ratio 2:1, with the centroid being twice as close to the midpoint of a side as it is to the opposite vertex. We use Apollonius's theorem to calculate the length of a median from the lengths of its side.

$m_a = \dfrac{ \sqrt{ 2b^2+2c^2 - a^2 } }{ 2 } = \dfrac{ \sqrt{ 2 \cdot \ 3.3^2+2 \cdot \ 9.3^2 - 6.3^2 } }{ 2 } = 6.227 \ \\ m_b = \dfrac{ \sqrt{ 2c^2+2a^2 - b^2 } }{ 2 } = \dfrac{ \sqrt{ 2 \cdot \ 9.3^2+2 \cdot \ 6.3^2 - 3.3^2 } }{ 2 } = 7.77 \ \\ m_c = \dfrac{ \sqrt{ 2a^2+2b^2 - c^2 } }{ 2 } = \dfrac{ \sqrt{ 2 \cdot \ 6.3^2+2 \cdot \ 3.3^2 - 9.3^2 } }{ 2 } = 1.916$

### #2 Obtuse scalene triangle.

Sides: a = 6.3   b = 14.17772101429   c = 9.3

Area: T = 22.54773452194
Perimeter: p = 29.77772101429
Semiperimeter: s = 14.88986050714

Angle ∠ A = α = 20° = 0.34990658504 rad
Angle ∠ B = β = 129.6766156622° = 129°40'34″ = 2.26332758944 rad
Angle ∠ C = γ = 30.32438433776° = 30°19'26″ = 0.52992509088 rad

Height: ha = 7.15878873712
Height: hb = 3.18107873329
Height: hc = 4.8498891445

Median: ma = 11.56880224636
Median: mb = 3.58435287275
Median: mc = 9.93657507878

Vertex coordinates: A[9.3; 0] B[0; 0] C[-4.02222197546; 4.8498891445]
Centroid: CG[1.75992600818; 1.61662971483]
Coordinates of the circumscribed circle: U[4.65; 7.95499246984]
Coordinates of the inscribed circle: I[0.71113949286; 1.51444028007]

Exterior (or external, outer) angles of the triangle:
∠ A' = α' = 160° = 0.34990658504 rad
∠ B' = β' = 50.32438433776° = 50°19'26″ = 2.26332758944 rad
∠ C' = γ' = 149.6766156622° = 149°40'34″ = 0.52992509088 rad

# How did we calculate this triangle?

The calculation of the triangle progress in two phases. The first phase is such that we try to calculate all three sides of the triangle from the input parameters. The first phase is different for the different triangles query entered. The second phase is the calculation of other characteristics of the triangle, such as angles, area, perimeter, heights, the center of gravity, circle radii, etc. Some input data also results in two to three correct triangle solutions (e.g., if the specified triangle area and two sides - typically resulting in both acute and obtuse) triangle).

### 1. Input data entered: side a, c and angle α.

$a = 6.3 \ \\ c = 9.3 \ \\ α = 20^\circ$

### 2. From angle α, side c and side a we calculate side b - by using the law of cosines and quadratic equation:

$a^2 = c^2 + b^2 - 2c b \cos α \ \\ \ \\ 6.3^2 = 9.3^2 + b^2 - 2 \cdot \ 9.3 \cdot \ b \cdot \ \cos 20^\circ \ \\ \ \\ \ \\ b^2 -17.478b +46.8 =0 \ \\ \ \\ p=1; q=-17.478; r=46.8 \ \\ D = q^2 - 4pr = 17.478^2 - 4\cdot 1 \cdot 46.8 = 118.290367771 \ \\ D>0 \ \\ \ \\ b_{1,2} = \dfrac{ -q \pm \sqrt{ D } }{ 2p } = \dfrac{ 17.48 \pm \sqrt{ 118.29 } }{ 2 } \ \\ b_{1,2} = 8.73914137 \pm 5.43806876958 \ \\ b_{1} = 14.1772101429 \ \\ b_{2} = 3.30107260373 \ \\ \ \\ \text{ Factored form of the equation: } \ \\ (b -14.1772101429) (b -3.30107260373) = 0 \ \\ \ \\ \ \\ b > 0 \ \\ \ \\ b = 14.177$

Now we know the lengths of all three sides of the triangle, and the triangle is uniquely determined. Next, we calculate another its characteristics - same procedure as calculation of the triangle from the known three sides SSS.

$a = 6.3 \ \\ b = 14.18 \ \\ c = 9.3$

### 3. The triangle perimeter is the sum of the lengths of its three sides

$p = a+b+c = 6.3+14.18+9.3 = 29.78$

### 4. Semiperimeter of the triangle

The semiperimeter of the triangle is half its perimeter. The semiperimeter frequently appears in formulas for triangles that it is given a separate name. By the triangle inequality, the longest side length of a triangle is less than the semiperimeter.

$s = \dfrac{ p }{ 2 } = \dfrac{ 29.78 }{ 2 } = 14.89$

### 5. The triangle area using Heron's formula

Heron's formula gives the area of a triangle when the length of all three sides are known. There is no need to calculate angles or other distances in the triangle first. Heron's formula works equally well in all cases and types of triangles.

$T = \sqrt{ s(s-a)(s-b)(s-c) } \ \\ T = \sqrt{ 14.89(14.89-6.3)(14.89-14.18)(14.89-9.3) } \ \\ T = \sqrt{ 508.38 } = 22.55$

### 6. Calculate the heights of the triangle from its area.

There are many ways to find the height of the triangle. The easiest way is from the area and base length. The area of a triangle is half of the product of the length of the base and the height. Every side of the triangle can be a base; there are three bases and three heights (altitudes). Triangle height is the perpendicular line segment from a vertex to a line containing the base.

$T = \dfrac{ a h _a }{ 2 } \ \\ \ \\ h _a = \dfrac{ 2 \ T }{ a } = \dfrac{ 2 \cdot \ 22.55 }{ 6.3 } = 7.16 \ \\ h _b = \dfrac{ 2 \ T }{ b } = \dfrac{ 2 \cdot \ 22.55 }{ 14.18 } = 3.18 \ \\ h _c = \dfrac{ 2 \ T }{ c } = \dfrac{ 2 \cdot \ 22.55 }{ 9.3 } = 4.85$

### 7. Calculation of the inner angles of the triangle using a Law of Cosines

The Law of Cosines is useful for finding the angles of a triangle when we know all three sides. The cosine rule, also known as the law of cosines, relates all three sides of a triangle with an angle of a triangle. The Law of Cosines is the extrapolation of the Pythagorean theorem for any triangle. Pythagorean theorem works only in a right triangle. Pythagorean theorem is a special case of the Law of Cosines and can be derived from it because the cosine of 90° is 0. It is best to find the angle opposite the longest side first. With the Law of Cosines, there is also no problem with obtuse angles as with the Law of Sines, because cosine function is negative for obtuse angles, zero for right, and positive for acute angles. We also use inverse cosine called arccosine to determine the angle from cosine value.

$a^2 = b^2+c^2 - 2bc \cos α \ \\ \ \\ α = \arccos(\dfrac{ b^2+c^2-a^2 }{ 2bc } ) = \arccos(\dfrac{ 14.18^2+9.3^2-6.3^2 }{ 2 \cdot \ 14.18 \cdot \ 9.3 } ) = 20^\circ \ \\ \ \\ b^2 = a^2+c^2 - 2ac \cos β \ \\ β = \arccos(\dfrac{ a^2+c^2-b^2 }{ 2ac } ) = \arccos(\dfrac{ 6.3^2+9.3^2-14.18^2 }{ 2 \cdot \ 6.3 \cdot \ 9.3 } ) = 129^\circ 40'34" \ \\ γ = 180^\circ - α - β = 180^\circ - 20^\circ - 129^\circ 40'34" = 30^\circ 19'26"$

An incircle of a triangle is a circle which is tangent to each side. An incircle center is called incenter and has a radius named inradius. All triangles have an incenter, and it always lies inside the triangle. The incenter is the intersection of the three angle bisectors. The product of the inradius and semiperimeter (half the perimeter) of a triangle is its area.

$T = rs \ \\ r = \dfrac{ T }{ s } = \dfrac{ 22.55 }{ 14.89 } = 1.51$

The circumcircle of a triangle is a circle that passes through all of the triangle's vertices, and the circumradius of a triangle is the radius of the triangle's circumcircle. Circumcenter (center of circumcircle) is the point where the perpendicular bisectors of a triangle intersect.

$R = \dfrac{ a b c }{ 4 \ r s } = \dfrac{ 6.3 \cdot \ 14.18 \cdot \ 9.3 }{ 4 \cdot \ 1.514 \cdot \ 14.889 } = 9.21$

### 10. Calculation of medians

A median of a triangle is a line segment joining a vertex to the midpoint of the opposite side. Every triangle has three medians, and they all intersect each other at the triangle's centroid. The centroid divides each median into parts in the ratio 2:1, with the centroid being twice as close to the midpoint of a side as it is to the opposite vertex. We use Apollonius's theorem to calculate the length of a median from the lengths of its side.

$m_a = \dfrac{ \sqrt{ 2b^2+2c^2 - a^2 } }{ 2 } = \dfrac{ \sqrt{ 2 \cdot \ 14.18^2+2 \cdot \ 9.3^2 - 6.3^2 } }{ 2 } = 11.568 \ \\ m_b = \dfrac{ \sqrt{ 2c^2+2a^2 - b^2 } }{ 2 } = \dfrac{ \sqrt{ 2 \cdot \ 9.3^2+2 \cdot \ 6.3^2 - 14.18^2 } }{ 2 } = 3.584 \ \\ m_c = \dfrac{ \sqrt{ 2a^2+2b^2 - c^2 } }{ 2 } = \dfrac{ \sqrt{ 2 \cdot \ 6.3^2+2 \cdot \ 14.18^2 - 9.3^2 } }{ 2 } = 9.936$