# Vector z-component

1. Aug 6, 2009

### zsk786

Hey. I'm currently learning about vectors and i have come to a point where im just plain stuck. This may be a stupid question but i dont get it.
Now say u have 2 vectors and u need to get there components (the vectors are A and B)
so u have
Ax = A cos theta
Bx = A cos thetax
Ay = A sin theta
By = A sin thetax
assuming that neither have any negative components

What i dont understand is if there is a vector in 3-d space how do u get Az and Bz
i mean even if u were working in x-y plane but finding the product of A x B
the formulas for C Components are
Cx = AyBz - AzBy
Cy = AzBx - AxBz
Cz = AxBy - AyBx

and u need that Z-component for both A and B

I would appreciate any help u could give me.

2. Aug 6, 2009

### CompuChip

When you write
Ax = A cos theta
Ay = A sin theta
you are probably mixing two coordinate systems.

It helps to think of a vector as a geometric object which is independent of a coordinate system. However, when speaking about a vector, we usually set up a coordinate system and express the vector by its coordinates. For example, you can draw to perpendicular axes, which you call the x and y axis, then measure how far you need to go along the x-axis and then how far parallel to the y-axis to get to the point the vector indicates. This gives you two numbers, Ax and Ay, and we can say that A = (Ax, Ay). This is called a Cartesian or rectangular coordinate system.
Another way of specifying the same point, is by saying how far you need to go from the origin and at which angle to some fixed line. This will give you two different numbers, namely A and theta; however they describe the same vector. This is called polar coordinates.
The relation
Ax = A cos theta
Ay = A sin theta
describe how you can switch from one way of describing the vector to the other (e.g. if I give you a set of polar coordinates (A, theta) you can calculate the Cartesian coordinates (Ax, Ay)).

This may be confusing at first, because for a long long time you have been used only to defining points in Cartesian coordinates, and vectors were probably introduced to you as "just being point" which you can describe with Cartesian coordinates. So you need to get used to having different ways to fix a point.

In three dimensions, the most obvious way is again in Cartesian coordinates, where you specify the shortest distance to three coordinates axes (x, y and z-axis) -- this gives you three numbers Ax, Ay, Az which fix the point. You cannot use polar coordinates now: giving an angle and a distance is sufficient for a point in the plane, but not in three dimensional space. Yet, there are other coordinates. For example, you can use polar coordinates (A, theta) instead of Ax and Ay to give a vector in the (x, y) plane, and then specify Az as the height above that plane. This is called cylindrical coordinates (think about why). Or, you can specify the distance to the origin (r) and two angles theta and phi, and describe the vector with these three numbers. This is called spherical coordinates, and there are similar relations:
Ax = r cos(theta) sin(phi)
Ay = r sin(theta) sin(phi)
Az = r cos(phi).

PS. Note that the expression you gave for calculating the components of A x B only works in Cartesian coordinates.

3. Aug 6, 2009

### tiny-tim

Welcome to PF!

Hi zsk786! Welcome to PF!

(have a theta: θ and try using the X2 tag just above the Reply box )
Actually, it works for negative components also …

you just have to get used to the situations when cos and/or sin are negative.
I'm not really following you here …

if A and B are in the x-y plane, and if C = AxB, then Az = Bz = Cx = Cy = 0.

it's always cos of the angle …

the only reason we say Ay = Asinθ is because the angle between A and the y-direction is (90º - θ),

so Ay = Acos(90º - θ) = Asinθ.

4. Aug 6, 2009

### zsk786

hey tiny-tim thx for pointing that out. According to the right hand rule (which says excatly wat u are saying) becasue all that would happen is that the only componetn C would have would extend in the Z-direction. I understand all that, i was saying in a x-y plane because i thought i would simplify answer to my question (basically help me see it better). Thx alot for help. It helped me alot, clarified a few things. And thx for telling me the expressions work in the negative , never really realized that

compuchip thx for all ur info it helped quite a bit, but i dont fully understand the expressions u gave for the spherical coordinates.
the main thing is that i dont understand what does the angle phi stands for ? and thx for the bit on cylindrical coordinates that helps alot

5. Aug 7, 2009

### CompuChip

Well, it's just another angle, just like theta. But in three dimensions, giving the distance to the origin and the angle with one axis is not enough to uniquely determine the point. You need to give at least the distance and two angles. (Actually, this is precisely what the concept of "3 dimensional" means: whichever type of coordinates you choose, you always need precisely three numbers to uniquely indicate a point -- whether those are (x, y, z) values or radius and two angles, or radius, one angle and height above a plane). In spherical coordinates, one of the angles is the angle in the (x, y) plane just like in polar coordinates (so together with the radius is determined a point in the plane) and the second angle is then taken to be the angle with the z-axis. Which one of theta and phi is the angle in the plane and which the angle with the z-axis depends on who you ask (physicists and mathematicians tend to use reversed conventions here) but the idea is illustrated in this picture from Wikipedia:

Note how the "prescription": go outwards a distance r, then make an angle phi in the plane and an angle theta upwards in spherical coordinates is similar to the "prescription" in Cartesian (go along the x-axis a distance Ax, then parallel to the y-axis a distance Ay, then parallel to the z-axis a distance Az) and cylindrical (go outwards a distance r, then make an angle theta with the axis, then go a distance z parallel to the z-axis).​

Last edited by a moderator: May 4, 2017
6. Aug 7, 2009

### tiny-tim

θ and φ are latitude (or latitude plus 90º) and longitude (or sometimes the other way round)

7. Aug 7, 2009

### zsk786

I think i got it. Thx for all the help i really appreciate it.