{"id":306,"date":"2007-02-11T21:43:16","date_gmt":"2007-02-11T21:43:16","guid":{"rendered":"http:\/\/scientopia.org\/blogs\/goodmath\/2007\/02\/11\/basics-vectors-the-other-dimensional-number\/"},"modified":"2007-02-11T21:43:16","modified_gmt":"2007-02-11T21:43:16","slug":"basics-vectors-the-other-dimensional-number","status":"publish","type":"post","link":"http:\/\/www.goodmath.org\/blog\/2007\/02\/11\/basics-vectors-the-other-dimensional-number\/","title":{"rendered":"Basics: Vectors, the Other Dimensional Number"},"content":{"rendered":"<p> There&#8217;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. <\/p>\n<p> A vector is a simple thing: it&#8217;s a number with a direction. A car can be going 20mph north &#8211; 20mph north is a vector quantity.  A 1 kilogram object experiences a force of 9.8 newtons straight down &#8211; 9.8n down is a vector quantity.<\/p>\n<p><!--more--><\/p>\n<p> To be precise about the definition, a vector is a <em>quantity<\/em> qualitatively different parts: a <em>magnitude<\/em> (aka, size) and a <em>direction<\/em>.<\/p>\n<p> When we&#8217;re talking about vectors, we also generally add the term <em>scalar<\/em>. A scalar is what we were calling a number before we got to vectors &#8211; it&#8217;s a quantity <em>without<\/em> a direction. 20mph is a scalar quantity called <em>speed<\/em>; 20mph northwest is a vector quantity called <em>velocity<\/em>.<\/p>\n<p> Vectors are fascinating things, which can be used to describe all sorts of physical phenomena. In physics, you simple can&#8217;t get away from them &#8211; they&#8217;re everywhere. Velocity, acceleration, force, momentum &#8211; they&#8217;re all vectors. <\/p>\n<p> Normally, we draw vectors as <em>arrows<\/em>, 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. <\/p>\n<p> We generally <em>represent<\/em> vectors in one of two ways. One of them is by length + angle &#8211; 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 <em>components<\/em>. 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 &#8211; that&#8217;s it&#8217;s y component, written A<sub>y<\/sub>; draw a vertical line from its tip to the x axis &#8211; that&#8217;s it&#8217;s X component, written A<sub>x<\/sub>. The result is a pair [5.00,8.66]. In general, an n-dimensional vector can be written as <em>n<\/em> scalars between brackets, so a three dimnesional vector could be written [x,y,z], and so on. If we aren&#8217;t using the components, we describe the magnitude of a vector A by |A|.<\/p>\n<p> And of course, you can do algebra with vectors. After all, given a new thing<br \/>\nto play with, what do mathematicians do? We invent algebras for it!<\/p>\n<p> Vector algebra is built mainly on addition and two kinds of multiplication.<\/p>\n<p> 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.<\/p>\n<p> Multiplication is a bit weird. There are two different kinds of multiplication of vectors. One, called <em>dot product<\/em> or <em>scalar product<\/em> multiplies two vectors, and results in a scalar. The other, the <em>cross product<\/em> is non-commutative, and only works in at least three dimensions.<\/p>\n<p> Given two vectors A and B, their dot product A&sdot;B is easiest to define in terms of<br \/>\ntheir components.\tIf they&#8217;re <em>n<\/em> dimensional vectors, then the dot product is:<\/p>\n<p>&Sigma;<sub>i=1&#8230;n<\/sub> A<sub>i<\/sub>*B<sub>i<\/sub><\/p>\n<p> So if A were a vector [A<sub>1<\/sub>, A<sub>2<\/sub>, A<sub>3<\/sub>], and B were<br \/>\na vector [B<sub>1<\/sub>, B<sub>2<\/sub>, B<sub>3<\/sub>], then A&sdot;B=A<sub>1<\/sub>*B<sub>1<\/sub>+A<sub>2<\/sub>*B<sub>2<\/sub>+A<sub>3<\/sub>*B<sub>3<\/sub>. For example, let&#8217;s look at two vectors: A=[2,4,1,5], and B=[6,2,3,-4]. A&sdot;B=2*6+4*2+1*3+5*-4 = 12+8+3+-20 = 3.<\/p>\n<p> The cross product is more interesting. Given two vectors A and B, their cross product A&times;B is a vector C where C&#8217;s magnitude is the area of the parallelogram<br \/>\nformed by putting the tail of B to the tip of A, and then adding parallels for both A and B. C&#8217;s direction is <em>perpendicular<\/em> to both A and B. There is one little trick &#8211; there are <em>two<\/em> possible directions for the cross product A&times;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 <em>right hand<\/em>, with the fingers curled from A towards B, the direction that your <em>thumb<\/em> is pointing is the direction of the cross-product.<\/p>\n<p> In three dimension, there&#8217;s a simple formula in terms of components. If A=[A<sub>x<\/sub>, A<sub>y<\/sub>, A<sub>z<\/sub>], and B=[B<sub>x<\/sub>, B<sub>y<\/sub>, B<sub>z<\/sub>], then A&times;B=C where:<\/p>\n<ul>\n<li> C<sub>x<\/sub> = A<sub>y<\/sub>*B<sub>z<\/sub> &#8211; A<sub>z<\/sub>*B<sub>y<\/sub><\/li>\n<li> C<sub>y<\/sub> = A<sub>z<\/sub>*B<sub>x<\/sub> &#8211; A<sub>x<\/sub>*B<sub>z<\/sub><\/li>\n<li> C<sub>z<\/sub> = A<sub>x<\/sub>*B<sub>y<\/sub> &#8211; A<sub>y<\/sub>*B<sub>x<\/sub><\/li>\n<\/ul>\n<p> So, for example, if A=[3,4,5] and B=[9,7,6] then A&times;B=<br \/>\n[4*6-7*5, 5*9-3*6, 3*7-4*9] = [24-35,45-18,21-36] = [-11,27,-15].<\/p>\n<p> Now, as I mentioned, in vector algebra cross-product isn&#8217;t commutative. But it&#8217;s not a total loss like quaternions; vector multiplication is anti-commutative: A&times;B = -(B&times;A).<\/p>\n<p> Cross product isn&#8217;t associative either &#8211; A&times;(B&times;C)&ne;(A&times;B)&times;C. But we do at least have the very interestingly odd property:<\/p>\n<p>A&times;(B&times;C) + B&times;(C&times;A) + C&times;(A&times;B) = 0<\/p>\n<p>\tWhere 0 is the 0 vector &#8211; that is, the vector with length 0.  <em>(Originally, one of the parens was mispositioned in the above equation; thanks for commenter &#8220;rory&#8221; for the catch.) <\/em><\/p>\n<p> Finally &#8211; we can multiply a scalar times a vector &#8211; multiplying a scalar s by a vector A = [x,y,z] gives [sx,sy,sz].<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There&#8217;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&#8217;s a number with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[74],"tags":[],"class_list":["post-306","post","type-post","status-publish","format-standard","hentry","category-basics"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4lzZS-4W","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/comments?post=306"}],"version-history":[{"count":0,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/306\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/media?parent=306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/categories?post=306"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/tags?post=306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}