How to find the direction cosines and direction angles for a given line

Given the line $$5x – 12y = 60$$ What are the direction angles and direction cosines?

From my notes, the direction cosines as the $$x, y$$-components of the unit vector having the same slope as the line.

Slope vector is $$\langle 12, 5 \rangle$$ and converting to a unit vector: $$\bigl\langle \frac{12}{13}, \frac{5}{13} \bigr\rangle$$. Using $$\arccos$$ with these two values, I get $$22.6^\circ$$ and $$67.4^\circ$$ respectively.

Since the line has a positive slope, I can picture a positive acute angle that the line would make with the $$x$$-axis, so $$22.6^\circ$$ makes sense.

But looking at the angle made with the y axis, it should be obtuse so it makes sense to subtract $$67.4$$ from $$180$$, yielding $$180^\circ - 67.4^\circ = 112.6^\circ$$. This aligns with the correct answer provided.

However, the answer sheet gave the direction $$\cos$$ for $$y$$ as $$-\frac{5}{13}$$ which would get the $$112.6^\circ$$ answer automatically. But how do I know when to include a negative, when the slope is positive?

• Why should the angle with the y-axis be obtuse? – NickD Feb 15 at 4:06
• I believe you've got it right and the textbook is wrong: the direction cosines are both positive. – NickD Feb 15 at 21:26
• It is possible the given answer is incorrect, it is from the instructor and not from a book. I'm still not sure how the slope vector would not be <12, 5> – McMath Feb 16 at 1:03
• What do you mean? The slope vector is correct: everything you've shown is correct up to the paragraph that starts "But looking at the angle made with the y axis,...". – NickD Feb 16 at 2:08
• Yeah, I kinda think the instructor answer is incorrect. I meant I do not know how the slope vector could be <12, -5>. The 112.6 answer would be towards the negative y axis which does not make sense. – McMath Feb 16 at 2:28

$$y=\frac{5}{12}x-5$$ is your formula in slope-intercept form, so your slope is indeed positive.

However, there is a gap within your reasoning, and that is the fact that the y-axis direction cosine is not actually about the y-value, but rather about the rotation to the y-axis. Slope is actually about the y-value, rather than rotation to the axis.

A line with a positive slope will form an obtuse angle with the y-axis, and cosines of obtuse angles are always negative. A line with a negative slope will form an acute angle with the y-axis, and cosines of acute angles are always positive.

Which means:

Lines with positive slope have a negative y value for their unit vector, and lines with negative slope have a positive y value for their unit vector.

The result of this is that you will need to use a negative version of the y part of the unit vector. Either your notes are slightly off (the cosines are for the unit vector with the negative of the slope of the line), or your textbook/teacher teaches a different "direction cosine" (which is the rarer case). I suggest going to ask your teacher for help if you don't understand.

Tl;dr/Quick Summary: The unit vector needs to have the negative version of the slope of the line. The reason is because obtuse angles have negative cosines and acute angles have positive cosines.

Note: Everything I just stated may or may not apply to 3d direction cosines. I assumed from your question that you were only learning 2d direction cosines.

Edit: If the textbook was wrong, then you were indeed looking for the angle made with the positive y-axis, and you were right. It would be clearer if you gave a picture or a transcript of the textbook problem.

• So the line $y = x$ forms an obtuse angle with the $y$-axis? How do you figure that? – NickD Feb 15 at 4:07
• @NickD To find the angle with the y-axis, you rotate the line clockwise until it reaches the y-axis. To find the angle of y=x and the y-axis, you would rotate the line 135 degrees clockwise until it reaches the y-axis, which would be the angle it creates that you need for direction angles and cosines. – Alien Feb 15 at 15:59
• That is not how direction cosines are defined.See e.g. the diagram in the wikipedia page. Note that if the components of the vector are all positive, then the cosine are all positive. – NickD Feb 15 at 17:22
• @NickD The question is asking for the angle between the vector and the negative pointing y-vector. Otherwise the confusion wouldn't have been around $112.6^{\circ}$ – Alien Feb 15 at 20:22
• The question is asking about direction cosines: the "negative pointing y-vector" is mentioned nowhere. The more likely scenario is that the answer sheet giving the direction cosine as $-\frac{5}{13}$ is wrong. – NickD Feb 15 at 20:52