Basics: Vectors, the Other Dimensional Number

There’s another way of working with number-like things that have multiple dimensions in math, which is very different from the complex number family: vectors. Vectors are much more intuitive to most people than the the complex numbers, which are built using the problematic number i.

A vector is a simple thing: it’s a number with a direction. A car can be going 20mph north – 20mph north is a vector quantity. A 1 kilogram object experiences a force of 9.8 newtons straight down – 9.8n down is a vector quantity.

To be precise about the definition, a vector is a quantity qualitatively different parts: a magnitude (aka, size) and a direction.

When we’re talking about vectors, we also generally add the term scalar. A scalar is what we were calling a number before we got to vectors – it’s a quantity without a direction. 20mph is a scalar quantity called speed; 20mph northwest is a vector quantity called velocity.

Vectors are fascinating things, which can be used to describe all sorts of physical phenomena. In physics, you simple can’t get away from them – they’re everywhere. Velocity, acceleration, force, momentum – they’re all vectors.

Normally, we draw vectors as arrows, where the length of the arrow corresponds to the magnitude of the vector, and the direction of the arrow is (obviously) the direction of the vector.

We generally represent vectors in one of two ways. One of them is by length + angle – for example, for a vector in a plane, we might use 10 @ 60 degrees, where the angle is measured relative to the X axis. The other representation is based on components. Take that vector 10@60 degrees, and put its starting point on the origin of a 2d graph. Draw a horizontal line from its tip to the y axis – that’s it’s y component, written Ay; draw a vertical line from its tip to the x axis – that’s it’s X component, written Ax. The result is a pair [5.00,8.66]. In general, an n-dimensional vector can be written as n scalars between brackets, so a three dimnesional vector could be written [x,y,z], and so on. If we aren’t using the components, we describe the magnitude of a vector A by |A|.

And of course, you can do algebra with vectors. After all, given a new thing
to play with, what do mathematicians do? We invent algebras for it!

Vector algebra is built mainly on addition and two kinds of multiplication.

Vector addition is really amazingly easy. To compute the sum A+B of two vectors A and B, draw them on a graph, with the tip of A touching the tail of B. Then draw an arrow from the tail of A to the tip of B. That arrow is the sum.

Multiplication is a bit weird. There are two different kinds of multiplication of vectors. One, called dot product or scalar product multiplies two vectors, and results in a scalar. The other, the cross product is non-commutative, and only works in at least three dimensions.

Given two vectors A and B, their dot product A⋅B is easiest to define in terms of
their components. If they’re n dimensional vectors, then the dot product is:

Σi=1…n Ai*Bi

So if A were a vector [A1, A2, A3], and B were
a vector [B1, B2, B3], then A⋅B=A1*B1+A2*B2+A3*B3. For example, let’s look at two vectors: A=[2,4,1,5], and B=[6,2,3,-4]. A⋅B=2*6+4*2+1*3+5*-4 = 12+8+3+-20 = 3.

The cross product is more interesting. Given two vectors A and B, their cross product A×B is a vector C where C’s magnitude is the area of the parallelogram
formed by putting the tail of B to the tip of A, and then adding parallels for both A and B. C’s direction is perpendicular to both A and B. There is one little trick – there are two possible directions for the cross product A×B; which one to use is a matter of convention. The common convention that I was taught is called the right hand rule: take the pair of vectors, and put their tails together, so that they form a V. Then take your right hand, with the fingers curled from A towards B, the direction that your thumb is pointing is the direction of the cross-product.

In three dimension, there’s a simple formula in terms of components. If A=[Ax, Ay, Az], and B=[Bx, By, Bz], then A×B=C where:

  • Cx = Ay*Bz – Az*By
  • Cy = Az*Bx – Ax*Bz
  • Cz = Ax*By – Ay*Bx

So, for example, if A=[3,4,5] and B=[9,7,6] then A×B=
[4*6-7*5, 5*9-3*6, 3*7-4*9] = [24-35,45-18,21-36] = [-11,27,-15].

Now, as I mentioned, in vector algebra cross-product isn’t commutative. But it’s not a total loss like quaternions; vector multiplication is anti-commutative: A×B = -(B×A).

Cross product isn’t associative either – A×(B×C)≠(A×B)×C. But we do at least have the very interestingly odd property:

A×(B×C) + B×(C×A) + C×(A×B) = 0

Where 0 is the 0 vector – that is, the vector with length 0. (Originally, one of the parens was mispositioned in the above equation; thanks for commenter “rory” for the catch.)

Finally – we can multiply a scalar times a vector – multiplying a scalar s by a vector A = [x,y,z] gives [sx,sy,sz].

0 thoughts on “Basics: Vectors, the Other Dimensional Number

  1. John Armstrong

    the cross product … only works in at least three dimensions.
    The cross product works in only three dimensions. There’s a lot more to be said about exactly why, but that’s much more than a comment will bear.

    Reply
  2. Susan

    But…but…you didn’t mention vector spaces, and all the other exciting things about vectors! What’s interesting to me is that so many other mathematical concepts can be related to vectors (in R^n) in the sense of isomorphism. Maybe you can do another post discussing vectors in a more general setting?
    Hi, by the way. I’ve recently discovered your blog and love it. It’s wonderful to see someone so passionate about mathematical concepts, and so interested in teaching it.

    Reply
  3. xander

    Q: What do you get when you cross a chicken with a turkey?
    A: (chicken)*(turkey)*sin(θ)
    Q: What do you get when you cross a mountain climber with a mosquito?
    A: Nothing — you can’t cross a scaler with a vector.

    Sorry…
    xander

    Reply
  4. shiva

    I am so slow! I was just about to ask you if vectors can also be considered multi-dimensional numbers? Since vectors are a more complete description of something we see (velocity tells us more about it than speed right?) are numbers among other things also descriptions of things we see?

    Reply
  5. Ørjan Johansen

    The cross product works in only three dimensions.

    I thought that there were cross products also in 7 dimensions.

    I would hazard a guess (and I may vaguely recall having read it somewhere) that this has something to do with the 1, 2, 4 and 8 dimensions of the previous multidimensional topic.

    Reply
  6. Pseudonym

    Just to be ultra-anal, this is the Gibbs vector calculus. It’s not the only way to understand vectors, just the most common. (This is “basics”, after all.) You can also understand vectors using linear algebra or geometric algebra.
    Geometric algebra, incidentally, answers the question that bugged me since high school: Why is it when you (cross) multiply a vector (directed length) with a vector (directed length), you get a vector (directed length; shouldn’t that be an area)?

    Reply
  7. Davis

    The cross product works in only three dimensions. There’s a lot more to be said about exactly why, but that’s much more than a comment will bear.

    I’m rather fond of considering the cross product a special case of the wedge product. It does let you define an analogue to the cross-product in higher dimensions, though I suppose it’s a bit unfortunate to have resulting objects that don’t live in the same realm as the ones you started with.

    Reply
  8. Anonymous

    Pseudonym
    Why is it when you (cross) multiply a vector (directed length) with a vector (directed
    length), you get a vector (directed length; shouldn’t that be an area)?
    You do: the area of a parallelogram is the norm of the cross product of the two spanning vectors.
    Why cross products only work in dimension 3? 1 +2 =3.
    In three dimensions, 1-forms are dual to 2-forms. A constant 1-form is a vector. A constant 2-form is a cross (wedge) product. Thus there is a canonical way to associate a vector with a cross product. In dim 5 for instance, 4-forms are dual to 1-forms, so there is a “cross product” which takes four vectors and returns a vector.
    Oh and by the way, the best vector spaces are over the complex numbers, not over the reals. (Scalars are complex)

    Reply
  9. Torbjörn Larsson

    We can also define subtraction A-B as the difference vector between the tip of B to the tip of A, when the tails are put on the same point.

    Given two vectors A and B, their cross product A×B is a vector C

    More precisely a pseudovector, because it doesn’t behave as a proper vector under rotations. The difference is important in physics. ( http://en.wikipedia.org/wiki/Cross_product , http://en.wikipedia.org/wiki/Pseudo-vector )

    A 1 kilogram object experiences a force of 9.8 newtons straight down – 9.8n down is a vector quantity.

    Now I’m going to nitpick considering that this is a math blog. On the other hand we discussed ambigousness of symbols in the last basic post (i vs j for imaginary unit). And here we have a rare and basic case of an unambigious symbolisation in form of SI units – which can be important if we don’t want Mars probes to crash unnecessarily. (Nudge, nudge.) Besides, it is one of my most beloved pet peeves.
    An SI measurement consists of a value and a unit, with space between. All units are spelled lowercase, i.e. “meter”, “newton”. Units derived from persons have uppercase symbols, i.e “m”, “N”.
    The value contains the plural and the unit should reject the article (makes software formatting simpler, btw). The above now becomes “a force of 9.8 newton straight down – 9.8 N down”.
    Also, prefixes are often misused. All prefixes larger than 1 are uppercase, all smaller are lowercase. There is one exception, due to a base unit exception. For historical reasons, the unit for mass is kilogram, not gram. Since this unit must be spelled “kilogram (kg)”, the “kilo (k)” prefix is lowercase.
    So it is “1 kN” or “2 GN”, or “3 mN” or “4 uN”. Really anal, but to see ‘5 GG’ and ‘6kn’ could be enough to make some grown men cry. Uh, but not me, btw. 🙂

    Reply
  10. Agnostic

    I know that none of the commenters needed this “basics” post, but assuming you’re going to use it in teaching others math, here’s a handy trick I use when teaching dot product (to high school students, but would work for college students too):
    Start with the first row of A and transpose it (you can describe it as rotating it 90 degrees or quarter-turn clockwise if you haven’t done transposes). Now, “overlay” this column with the first column of B. I think this helps them visualize what to do — when numbers are written side-by-side (like “3x”), they know that means multiply; and when they have a vertical list of numbers, they’ve only seen that in adding a bunch of numbers by hand. Ta-da: that’s the first entry in the answer. Repeat.
    It also reinforces the property that the number of columns of A must “feed into” the number of rows of B. If you had an m-by-n matrix multiplied by another m-by-n matrix (m =/= n), they’d see that they couldn’t “overlay” the transposed row of A with the column of B: it would be too short or too long. I have yet to find a better way to get beginning students to internalize this idea.

    Reply
  11. Antendren

    The cross product works in only three dimensions.
    One generalization of a cross-product works in any dimension. It’s an (n-1)-ary operator with the property that:
    x1&sdot cross(x2,&hellip ,xn) = det(x1,&hellip ,xn)
    With this version, the only reason 3 is special is because 3 = 2+1, and people prefer binary operators.

    Reply
  12. Rory Parle

    “A×(B×C) + (B×C)×A + C×(A×B) = 0”
    That looks wrong. Let B×C=D, then you have A×D + D×A + C×(A×B) = 0. But A×D + D×A = 0, so that would require that C×(A×B) = 0 for all vectors A,B,C.
    Did you mean A×(B×C) + B×(C×A) + C×(A×B) = 0 (i.e., rearrange the brackets in the second expression)?
    It’s a while since I did anything with cross products, but I think that’s right.

    Reply
  13. Mark C. Chu-Carroll

    Rory:
    Good catch, the parens are wrong there – the parens should be in the same position in all three parts of the cross-product. I’ll fix it ASAP.

    Reply
  14. Jon L

    I am so slow! I was just about to ask you if vectors can also be considered multi-dimensional numbers?

    Actually, the way I learned to represent vector components was not as ordered pairs but as multi-diminsional numbers. ie (Vx,Vy) = Vî + Vĵ where î and ĵ are called ‘unit vectors’ (vectors of magnitude 1 and direction parallel to the x and y axis respectively). As for the second part of you post, I’m not exactly sure what your asking but one possible answer is that numbers only describe things we see, or anything infact, when they have units. 1 is an abstract concept but 1 meter describes something. It says “for whatever a ‘meter’ is, we’ve got 1 of them.” Units act as a kind of interface between the quantitative and qualitative aspects of a mathematical description. Infact units of measurement might actually be an interesting topic for a Basics post, MCC.
    Also, MCC,

    A×(B×C) + (B×C)×A + C×(A×B) = 0

    is that right? I mean if BxC = D and AxD = -(DxA) doesn’t that mean AxD + DxA + Cx(AxB) = Cx(AxB)? maybe you meant Ax(BxC) + Bx(CxA) + Cx(AxB)= 0?

    Reply
  15. Morgan

    You seem to have left an italics tag open when you made your correction. Also it looks like I am whispering. Cool.

    Reply
  16. Pseudonym

    Incidentally, here’s how to make sure that you never mess up the Jacobi identity.
    A derivation D on a product B×C is an operator such that:
    D(B×C) = D(B)×C + B×D(C)
    You may recognise this as the product rule from high-school calculus.
    The Jacobi identity says, that the operator A× is a derivation:
    A×(B×C) = (A×B)×C + B×(A×C)
    Apply a little reordering and there you have it.

    Reply
  17. Torbjörn Larsson

    Infact units of measurement might actually be an interesting topic for a Basics post, MCC.

    I certainly agree, but perhaps it is more appropriate for a physics blog. And Mark has been very productive already.
    So I have proposed the same on a physics scienceblog, Chad Orzel’s IIRC. We’ll see if he or anyone else picks up the torch here.

    here’s how to make sure that you never mess up the Jacobi identity.

    Another way is to go back to the permutation definition, and observe that A,B,C simply rotates through the expression.
    Your way is more elegant and certain, since it explains more and places the parenthesis correctly.

    Reply
  18. Peter

    Cool. But what about all the statistical uses? Including vectors with many more dimensions than 2 or 3. Could easily be thousands of dimensions, or, given data mining, millions…..

    Reply
  19. HWSoD

    you have a very minor typo I think.
    “you simple can’t get away from them”
    should be:
    “you simply can’t get away from them”

    Reply
  20. Johnny Vector

    Oh look, a post where my pseudonym makes sense! Also…

    The common convention that I was taught is called the right hand rule

    ObXKCD (and really, on this blog, XKCD really is obligatory): Right-Hand Rule

    Reply

Leave a Reply