Refer to the attached image.
Since AN is an altitude, an altitude of a triangle is a line segment through a vertex and perpendicular to a line containing the base forming a right angle with the base.
Consider
,
by Pythagoras theorem, we get
![(Hypotenuse)^{2}=(Base)^{2}+(Perpendicular)^{2}](https://tex.z-dn.net/?f=%20%28Hypotenuse%29%5E%7B2%7D%3D%28Base%29%5E%7B2%7D%2B%28Perpendicular%29%5E%7B2%7D%20)
![(AB)^{2}=(BN)^{2}+(AN)^{2}](https://tex.z-dn.net/?f=%20%28AB%29%5E%7B2%7D%3D%28BN%29%5E%7B2%7D%2B%28AN%29%5E%7B2%7D%20)
![(20)^{2}=(BN)^{2}+(12)^{2}](https://tex.z-dn.net/?f=%20%2820%29%5E%7B2%7D%3D%28BN%29%5E%7B2%7D%2B%2812%29%5E%7B2%7D%20)
![400=(BN)^{2}+144](https://tex.z-dn.net/?f=%20400%3D%28BN%29%5E%7B2%7D%2B144%20)
![400-144=(BN)^{2}](https://tex.z-dn.net/?f=%20400-144%3D%28BN%29%5E%7B2%7D%20)
![(BN)^{2}=256](https://tex.z-dn.net/?f=%20%28BN%29%5E%7B2%7D%3D256%20)
So, BN = 16
Consider
,
by Pythagoras theorem, we get
![(Hypotenuse)^{2}=(Base)^{2}+(Perpendicular)^{2}](https://tex.z-dn.net/?f=%20%28Hypotenuse%29%5E%7B2%7D%3D%28Base%29%5E%7B2%7D%2B%28Perpendicular%29%5E%7B2%7D%20)
![(AC)^{2}=(NC)^{2}+(AN)^{2}](https://tex.z-dn.net/?f=%20%28AC%29%5E%7B2%7D%3D%28NC%29%5E%7B2%7D%2B%28AN%29%5E%7B2%7D%20)
![(15)^{2}=(NC)^{2}+(12)^{2}](https://tex.z-dn.net/?f=%20%2815%29%5E%7B2%7D%3D%28NC%29%5E%7B2%7D%2B%2812%29%5E%7B2%7D%20)
![225=(NC)^{2}+144](https://tex.z-dn.net/?f=%20225%3D%28NC%29%5E%7B2%7D%2B144%20)
![225-144=(NC)^{2}](https://tex.z-dn.net/?f=%20225-144%3D%28NC%29%5E%7B2%7D%20)
![(NC)^{2}=81](https://tex.z-dn.net/?f=%20%28NC%29%5E%7B2%7D%3D81%20)
So, NC = 9
So, BC = BN + NC
BC = 16+9 = 25
Now consider triangle ABC,
Consider ![(BC)^{2}=(AB)^{2}+(AC)^{2}](https://tex.z-dn.net/?f=%20%28BC%29%5E%7B2%7D%3D%28AB%29%5E%7B2%7D%2B%28AC%29%5E%7B2%7D%20)
![(25)^{2}=(20)^{2}+(15)^{2}](https://tex.z-dn.net/?f=%20%2825%29%5E%7B2%7D%3D%2820%29%5E%7B2%7D%2B%2815%29%5E%7B2%7D%20)
625 = 400 + 225
625 = 625
Therefore, by the converse of Pythagoras theorem , which states that "If the square of the longest side of a triangle is equal to the sum of the squares of the other two sides, then the triangle is a right triangle".
Therefore, triangle ABC is a right triangle.