The slope of line through A(2,2) and B(3,4) is :
m=4−23−1=21=2
now,let us find the slope of line passing C(6,8) and D(x,y)
if two line is perpendicular , product of their slopes is equal to -1
m⋅n=−1
2⋅n=−1
n=−12
now ,let us write equations of lines
equation for line passing A(2,2) and D(x,y)
y−2=2(x−2)
y=2x−4+2
y=2x−2 (1)
equation for line passing C(6,8) and D(x,y)
y−8=−12(x−6)
y=−12(x−6)+8
y=−12x+3+8
y=−12x+11 (2)
let us write the equations (1) and (2) as equal
2x−2=−12x+11
2x+12x=11+2
52x=13 , 5x=13⋅2 ,x=265 , x=5.2
use equation (1) or (2)
y=2x−2
insert x=5.2
y=2⋅5.2−2
y=10.4−2
y=8.4
D=(5.2,8.4)
the end points are C(6,8) and D(5.2,8.4)
The length of the altitude can be calculated using :
hC=√(5.2−6)2+(8.4−8)2
hC=√(−0.8)+(0.4)2
hC=√0.64+0.16
hC=√0.80
hC=0.89