Math formulas and cheat sheets for Triangles in two dimensions

## Triangles in two dimensions

### Area of the triangle

The area of the triangle formed by the three lines:

 A1x+B1y+C1A2x+B2y+C2A3x+B3y+C3=0=0=0

is given by

 A=∣∣∣∣A1A2A3B1B2B3C1C2C3∣∣∣∣22⋅∣∣∣A1A2B1B2∣∣∣⋅∣∣∣A2A3B2B3∣∣∣⋅∣∣∣A3A1B3B1∣∣∣

The area of a triangle whose vertices are P1(x1,y1),P2(x2,y2)$P_1(x_1, y_1) , P_2(x_2, y_2)$and P3(x3,y3)$P_3(x_3, y_3)$ is given by :

 A=12∣∣∣∣x1x2x3y1y2y3111∣∣∣∣

and by:

 A=12∣∣∣x2−x1x3−x1y2−y1y3−y1∣∣∣

### Centroid

The centroid of a triangle whose vertices are P1(x1,y1),P2(x2,y2)$P_1(x_1,y_1), P_2(x_2, y_2)$ and P3(x3,y3)$P_3(x_3, y_3)$ is given by:

 (x,y)=(x1+x2+x33,y1+y2+y33)

### Incenter

The incenter of a triangle whose vertices are P1(x1,y1),P2(x2,y2)$P_1(x_1,y_1), P_2(x_2, y_2)$ and P3(x3,y3)$P_3(x_3, y_3)$ is given by:

 (x,y)=(ax1+bx2+cx33,ay1+by2+cy33)

where a$a$ is the length of P2P3$P_2P_3$, b$b$ is the length of P3P1$P_3P_1$, and c$c$ is the length of P1P2$P_1P_2$.

### Circumcenter

The circumcenter of a triangle whose vertices are P1(x1,y1),P2(x2,y2)$P_1(x_1,y_1), P_2(x_2, y_2)$ and P3(x3,y3)$P_3(x_3, y_3)$ is given by:

 (x,y)=⎛⎝⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜ ∣∣∣∣∣x21+y21x22+y22x23+y23y1y2y3111∣∣∣∣∣2⋅∣∣∣∣x1x2x3y1y2y3111∣∣∣∣ , ∣∣∣∣∣x1x2x3x21+y21x22+y22x23+y23111∣∣∣∣∣2⋅∣∣∣∣x1x2x3y1y2y3111∣∣∣∣ ⎞⎠⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟

### Orthocenter

The orthocenter of a triangle whose vertices are P1(x1,y1),P2(x2,y2)$P_1(x_1,y_1), P_2(x_2, y_2)$ and P3(x3,y3)$P_3(x_3, y_3)$ is given by:

 (x,y)=⎛⎝⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜ ∣∣∣∣∣y1y2y3x2x3+y21x3x1+y22x1x2+y23111∣∣∣∣∣2⋅∣∣∣∣x1x2x3y1y2y3111∣∣∣∣ , ∣∣∣∣∣x21+y2y3x22+y3y1x23+y1y2x1x2x3111∣∣∣∣∣2⋅∣∣∣∣x1x2x3y1y2y3111∣∣∣∣ ⎞⎠⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟