# Triangle

## Triangle analytical geometry.

### Centroid of Triangle

The centroid of a triangle in a co-ordinate system can be expressed as

*x _{s} = (x_{1} + x_{2} + x_{3}) / 3 (1)*

*y _{s} = (y_{1} + y_{2} + y_{3}) / 3 (1b)*

### Area of Triangle

The area of the triangle can be expressed as

*A = | ((x _{1} y_{2} - x_{2} y_{1}) + (x_{2} y_{3} - x_{3} y_{2}) + (x_{3} y_{1} - x_{1} y_{3})) / 2 | (2)*

### Triangle Calculator

Point | x | y |
---|---|---|

1 | ||

2 | ||

3 | ||

Centroid | ||

Area |

### Example - Centroid and Area of Triangle

The centroid of a triangle with points* P _{1}(0,0), P_{2}(1,1) *and

*P*can be calculated as

_{3}(1,0.5)*x _{s} = (0 + 1 + 1_{}) / 3*

* = 0.67 *

*y _{s} = (0 + 1 + 0.5) / 3*

* = 0.5*

The area can be calculated as

*A = | ((0 1 - 1 0) + (1 0.5 - 1 1) + (1 0 - 0 0.5)) / 2 |*

* = 0.25 *