# direction cosines of vectors

Hi

I don't understand the description in my book of direction cosines of vectors. There is a picture below.

Why, for example, is a/r = cos(alpha)? Is it using a right angled triangle that I can't see or some trig identity that I don't know or am I just missing the point entirely?

thanks
cosines.gif
###### Who is Participating?

Commented:
The yz plane is perpendicular to the x axis, so any line in the yz plane will be perpendicular to the x axiz
0

Commented:
Your diagram isn't showing 'r' or 'a'. I do see alpha.
0

Commented:
the angle between x and u is alpha
0au is a right angle
0

Commented:
See direction cosines in:http://emweb.unl.edu/math/mathweb/vectors/vectors.html#vec5>> a/r = cos(alpha)?If you have a vector A, whose magnitude is A, and whose coordinates are (ax, ay, az), then consider the the right triangle formed by A with the x-axis (i.e., drop a perpendicular line from the head of A to the x-axis at the coordinate (ax, 0, 0). The angle alpha is then determined by the formula:    cos(alpha) = ax/ASo your r corresponds to the magnitude of u and your 'a' corresponds to the x-coordinate of u.
0

Author Commented:
sorry i uploaded the wrong picture :(
cosines.jpg
0

Author Commented:
Maybe i've been looking at this for too long but you say

"If you have a vector A, whose magnitude is A, and whose coordinates are (ax, ay, az), then consider the the right triangle formed by A with the x-axis (i.e., drop a perpendicular line from the head of A to the x-axis at the coordinate (ax, 0, 0). The angle alpha is then determined by the formula:
cos(alpha) = ax/A"

How do i know that the line from the head of A to the coordinate (ax, 0, 0) will be perpendicular to the x axis?

The diagram on the web page you linked to is clearer than the one i posted so shall we use that one? I've included it below
Image517.gif
0

Commented:
you can also look at the dot product of
(ax, ay, az)-(ax, 0,0)
and
(ax, 0,0)-(0,0,0)
0

Author Commented:
sorry but i'm hopeless at thinking in 3 dimensions and I've stared at this diagram so long i can't see the wood for the trees so please bear with me.

A line from (ax,ay,az) to (ax,0,0) is perpendicular to the axis you say. (I'm not saying i don't believe you - just can't see it yet)

ozo said: The yz plane is perpendicular to the x axis, so any line in the yz plane will be perpendicular to the x axiz

How do a know the line from (ax,ay,az) to (ax,0,0) is in the yz plane?  Should i be able to tell that from looking at the coordinates? If so, how. When i look at the diagram the line i am drawing in my head doesn't look perpendicular

I've only just learned about dot products today and only in 2d but if you think it would help and were willing to show me a worked example i'd work through it
0

Author Commented:
am i doing something wrong as I've drawn a line from (ax,ay,az) to (ax,0,0) in this diagram - its not clear I know - and it doesnt look perpendicular to x or in the yz plane
Image517.jpg
0

Commented:
Claim: line from (ax,ay,az) to (ax,0,0) is perpendicular to the x-axis Proof:Consider two vectors D and E, where they are defined as:D = (ax, 0, 0)E = A - D =  (ax,ay,az) - (ax,0,0) = (0, ay, az)First of, notice that E has 0 for its x-component. Think about what that means in your 3D world. A vector with a 0 x-component has what distinguishing property?So, think of D as a vector that is along the x-axis from the origin (0,0,0) to the point, (ax,0,0).And from that point, (ax,0,0), draw a line to the head of A. And call that line a vector (it has magnitude and direction). Do you see that this vector is E? This point may complete the picture for you.But continuing analytically..dot products (general):   http://www.mvps.org/directx/articles/math/dot/index.htmTake the dot product of D and E:    D . E =  (ax, 0, 0) . (0, ay, az) = 0 + 0 + 0 = 0D . E = |D| |E| cos (beta) = 0So, cos(beta) = 0So, beta = ?
0

Commented:
Intuitive hand-waving..That line you drew from (ax,ay,az) to (ax,0,0). If you project that line onto the x-y plane, you have a dark line in your diagram that is parallel to the y-axis, right?And if you rotate that line you drew towards the dark line in your diagram, then that sweep defines a plane.And that plane is a plane that is parallel to the y-z plane, right?So that line you drew lies in a plane that is parallel to the y-z plane, right?And the x-axis is perpendicular to the y-z plane.Or, you could say that the y-z plane is perpendicular to the x-axis.So, the line you drew is perpendicular to the x-axis.
0

Author Commented:

My line E is in the yx plane. I think i can visualise how A = D+E but i still don't see how a line from (ax,0,0) to (ax,ay,az) is perpendicular to the x axis

Do i need dot products for this as I'm already confused
0

Commented:
When the dot product of two vectors is 0, then they are perpendicular to each other since cos 90 = 0.
0

Author Commented:
That line you drew from (ax,ay,az) to (ax,0,0). If you project that line onto the x-y plane, you have a dark line in your diagram that is parallel to the y-axis, right?

What do you mean project? What do you mean by dark line? Why is it dark? Is it one of the lines already on the diagram?
0

Author Commented:
I am aware of that rule that about dot products but i don't think its helping me at the moment - it is just obfuscating the issue for me i think given as i dont know how to do them in 3d
0

Commented:
Then you can think of them in 2d.
Ignoring any one of the 3 coordinates leaves you with a 2d situation, and they are still perpendicular.
Also, you can consider the 2d plane that goes through (ax,ay,az), (ax,0,0) and (0,0,0)
0

Author Commented:
ok, this is painful isn't it?

I can 'see' that the lines D and E from previous post are perpendicular using dot products but I can't see it in my head. I mean i can't visualise it i guess.

I have drawn some lines in the xy plane on a diagram. Are you saying they are all perpendicular to the x axis because this is what is confusing me. I just can't articulate it or draw it!
235-unit-vector.jpg
0

Commented:
If the diagram were fully labeled, we could directly talk about the different objects.You have one line on the x-y plane that is thicker (i.e., darker) than the rest; namely, the line that is parallel to the y axis. This dark line is perpendicular to the x-axis. The plane that is defined by the dark line and the line you drew is parallel to the y-z plane.
0

Author Commented:
I mean lines on the yz plane. I wish you could edit posts.
0

Author Commented:
Do you want me to add some labels to the diagram? I can edit the picture in photoshop and upload it again? I've just posted a smashing example of my photoshop artwork.
0

Commented:
>> Are you saying they are all perpendicular to the x axis
yes, that is what ozo meant
0

Commented:
The answer is yes, there is a right-angled triangle that you can't see.

Let's start with your original diagram, with a vector u.  You can piece u together as a sum of components in each of the directions x, y, and z.

u = ax + by + cz  (Pretend I'm using whatever vector notation you are comfortable using, like u = ai + bj + ck or whatever.)

On your diagram, you can actually see the components of u on the x and y directions (but for some reason, they didn't draw it in for the z direction).

Your hidden right-angle triangle consists of the origin, the endpoint of the vector u, and the endpoint of the vector ax, on the x axis (in one of your diagrams you used a purple line to draw the last edge in).  It's a little hard to see that it's a right angle, because it's rotated upwards a bit, but perhaps you can imagine it being moved back down onto the x-y plane.

The directional cosine is just the cosine of the angle at the origin for that hidden right-angled triangle, which is a / r.  (r being the length of the vector u).

We can make directional cosines for the other two directions by drawing in the other two triangles.

Hope this helps!
0

Author Commented:
I know images can be deceiving and all that but they really dont look like right angles. I even tried to make a cube out of paper and used my pen as a vector and they don't look like they are at right angles to the x axis
0

Commented:
Build a little model using cardboard and sticks.
0

Commented:
Maybe it will help to visualize this:
Bend a wire at right angles.
Let one leg of that wire be the x axis.
Hold that axis fixed, and spin the wire around that axis.
See how the other leg sweeps out a plane.
The wire stays at a right angle, and anything in that plane is perpendicular to the fixed leg of the wire
0

Commented:
cardboard for the three planes
glue a pencil at the origin making a 45 degree angle
drop a string from the tip of the pencil to the x-axis - make it perpendicular to the x-axis

look carefully at the string - isn't it parallel to the y-z cardboard plane?
0

Commented:
In http://www.youtube.com/watch?v=AJfEeKIdmxI is the outline of a solid rectangle formed by the vector P. Now do you see that there is a plane parallel to the y-z plane?
0

Author Commented:
To me it looks like a triangle that is leaning backwards a little bit. If it fell all the way back so it was flat on its back in the xy plane it would look like this:
cosines.jpg
0

Commented:
In the video is a vector r whose tip is P(x,y,z). There is a solid rectangular object formed from P. There is a plane parallel to the y-z axis that passes through P and A (dashed blue line). This plane is perpendicular to the x-axis. The line AP is perpendicular to the x-axis.
Let i, j, and k be the unit vectors associated with the orthogonal x,y,z-axis.
Given a vector P = (A,B,C) , then P can be expressed as:
P = Ai + Bj + Ck
The vectors, Ai, Bj, Ck are the respective projections of P onto the three axis.
Using the solid rectangular box in the video formed by P, notice that Ai is the vector formed by dropping a string from from the tip of P perpendicular to the x-axis.
If you review the first parts of Linear Algebra, this may become clearer.

0

Commented:
So if you had a right angle uax0 in the xy plane, what would you expect it to look like when rotated up to az?
0

Author Commented:
ozo, i actually tried that with a wire before you posted it :)

I do agree that it is at right angles from the dot product but it just doesn't look it. Was this comment correct: ID: 33497210?

I will watch that video on youtube
0

Commented:
-- You drew a line from the tip of A to the x-y plane parallel to the z-axis
-- call intersection point B
-- draw a line from the tip of A to the x-z plane parallel to the y-axis
-- call intersection point C

From geometry (or intuition), do you see that these two line AB and AC are perpendicular to the x-y and x-z planes, respectively? After all, the y-axis is perpendicular to the x-z plane and AC is parallel to the y-axis.

-- You drew a line from B to the x-axis (call intersection D), and this line is parallel to the y-axis also. CABD form a rectangle - a plane that is parallel to the y-z plane.
0

Author Commented:
I made a model out of pipe cleaners. When i lay the vector flat in the xy plane I can see the angle from the tip of A to the x axis is perpendicular. When i move vector up I can see that it is still a right angle.

I would not have realised that the a line in the yz plane was perpendicular to the x axis as you rotate it all the way around. It only looks perpendicular to me at the points of a compass
v1.jpg
v2.jpg
0

Author Commented:
i get this now but phoffric i didn't understand this comment: ID: 33499474
You drew a line from the tip of A to the x-y plane parallel to the z-axis
-- call intersection point B

as I didn't think the line i drew (which is teh orange pipe cleaner above) is parallel to the z axis?
0

Commented:
>> In your drawing in http:#33496429
>>  -- You drew a line from the tip of A to the x-y plane parallel to the z-axis

In http:#33496429 are only two vertical lines - one is the z-axis and the other is the line that I was referring to. (This line is not in your pipe cleaner construction.)
0

Author Commented:
Dont you like the pipe cleaner construction????

Do you want me to send you one????
0

Commented:
Yes, provided that you complete it with other colors and make it look like the video.
0

Author Commented:
Any other pipe cleaner requests? Sword? Sausage dog? Pair of earrings?
0

Author Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.