Right-angled triangles and Pythagorean theorem