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
So, BN = 16
Consider ,
by Pythagoras theorem, we get
So, NC = 9
So, BC = BN + NC
BC = 16+9 = 25
Now consider triangle ABC,
Consider
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.