I am apparently an expert in answering two year old questions. Let's continue.
The altitude through C is the perpendicular to AB through C.
There are a few ways to do this one. We can calculate the slope of AB as -4,−4, then the slope of the perpendicular is 1/414 and we can find the meet of the perpendicular through C and the line through A and B. Let's try another way.
Let's call the foot of the perpendicular F(x,y)F(x,y). We know the dot product of the direction vector CF with the direction vector AB is zero if they're perpendicular:
(B-A) cdot (F - C) = 0(B−A)⋅(F−C)=0
(1-,4) cdot (x-4,y-8) = 0(1−,4)⋅(x−4,y−8)=0
x - 4 - 4y + 32 = 0 x−4−4y+32=0
x - 4y = -28 x−4y=−28
That's one equation. The other equation says F(x,y)F(x,y) is on the line through A and B:
(y - 5)(2-3)=(x-3)(9-5)(y−5)(2−3)=(x−3)(9−5)
5 - y = 4(x-3)5−y=4(x−3)
y = 17 - 4xy=17−4x
They meet when
x - 4(17 - 4x) = -28x−4(17−4x)=−28
x - 68 + 16 x = -28 x−68+16x=−28
17 x = 4017x=40
x = 40/17 x=4017
y = 17 - 4 (40/17) = 129/17 y=17−4(4017)=12917
The length CF of the altitude is
h = \sqrt{ (40/17-4)^2 + (129/17 - 8)^2} = 7 /sqrt{17}h=√(4017−4)2+(12917−8)2=7√17
Let's check this by calculating the area using the shoelace formula and then solving for the altitude. A(3,5),B(2,9),C(4,8)
a = \frac 1 2 | 3(9)-2(5) + 2(8)-9(4) + 4(5)-3(8)| = 7/2a=12|3(9)−2(5)+2(8)−9(4)+4(5)−3(8)|=72
AB=sqrt{ (3-2)^2+(9-5)^2 } = sqrt{17}AB=√(3−2)2+(9−5)2=√17
a = \frac 1 2 b h a=12bh
7/2 = 1/2 h sqrt{17} 72=12h√17
h = 7/sqrt{17} quad quad quad sqrt