In Euclidean geometry, Carnot's theorem states that the sum of the signed distances from the circumcenter D to the sides of an arbitrary triangle ABC is
where r is the inradius and R is the circumradius of the triangle. Here the sign of the distances is taken to be negative if and only if the open line segment DX (X = F, G, H) lies completely outside the triangle. In the diagram, DF is negative and both DG and DH are positive.