this formula is used in triangles to define either a cosine or the side of the triangle opposite of the cosine's angle
c2=a2+b2-2abcosc
cosc= the cosine of the angle opposite of the c side of the triangle ABC
hence cosc=(a2+b2-c2)/2ab hereby the same is true for cosa where cosa is the cosine of the angle opposite of the a side and for cosb where cosb is the cosine of the angle opposite of the side b in the triangle