The product of the slope of two perpendicular lines is equal to -1. If a line is perpendicular to a line with slope 3, the slope of the line is equal to `-1/3` .
As the line passes through the point (5,4), the equation of the line is `(y - 4)/(x - 5) = -1/3`
=> 3(y - 4) = 5 - x
=> 3y - 12 = 5 - x
=> x + 3y - 17 = 0
The required equation of the line is x + 3y - 17 = 0
Since the line has a slope of 3, the perpendicular line will have a slope of -1/3 since that is the negative reciprocal of 3.
Plug this into the point slope formula:
y - y1 = m(x - x1) where m is the slope and (x1, y1) is the point.
y - 4 = (-1/3)(x - 5)