Triangle Inequality Theory