Equations and properties of triangles