The end points of the hypotenuse are ( 1,3 ) and ( −4,1 ).
Let the right angled triangle be ΔABC where AC is the hypotenuse and ∠B=90°.
The legs of the right angled triangle are AB and BC respectively perpendicular to each other.
The slopes of the line segment AB and BC are m 1 and m 2 respectively.
According to the given condition,
m 1 ⋅ m 2 =−1.
If,
m 1 =m m 2 = −1 m
The equation of line passing through the point ( x 0 , y 0 ) and having slope of m is given by,
( y− y 0 )=m( x− x 0 )(1)
Substitute the value of ( x 0 , y 0 ) as ( 1,3 ) and slope as m in equation (1) to obtain the equation of line AB.
( y−3 )=m( x−1 ) y−3=mx−m mx−y−m+3=0
Similarly, substitute the value of ( x 0 , y 0 ) as ( −4,1 ) and slope as −1 m in equation (1) to obtain the equation of line AC.
( y−1 )= −1 m ( x+4 ) m( y−1 )=−x−4 my−m=−x−4 x+my−m+4=0
Thus, the equation of legs of the right angled triangle is mx−y−m+3=0 and x+my−m+4=0.