topics.07_vector_basics

What is a Vector?

Put simply, vectors are quantities that have both a magnitude and a direction, but no position.  This lack of position can be a tricky thing to grasp at first, so let's step through this definition very slowly, and discuss precisely what is meant by each term.


magnitude:

Magnitude refers to the property of relative size or extent.

When we measure something, such as the time it takes you to read this paragraph, we can write down that measurement as a number usually followed by a unit. For example, it may take you 30 seconds to read this paragraph. Using the symbol t for time, one could write down:

t = 30s

Usually, we would say, "The time period was 30 seconds long." Or we might say, "30 seconds passed." For now, though, let us say that the quantity of time has a size of 30 seconds.  We are familiar with many types of measurement such as this: "6 feet long", "72 deg Fahrenheit", and "warp factor 6"

Quantities such as this, which may be described completely in terms of their magnitude, are referred to as scalars.

direction:

Direction is the information contained in the relative position of one point with respect to another point without the distance information.

When we say that a quantity has a direction, we mean a direction much like how a direction is thought about on a compass (an absolute frame of reference).  We also might speak about a  direction relative to ourselves (our own frame of reference).  Either way, directions are relative - they describe one point in respect to another.  For example, if we were especially cold-hearted, we might give driving directions as such, using the symbol d for direction:

d = 90º

The less cold-hearted would would say something more like "turn 90 degrees to the left" or, more generally "go that way" (along with a hand gesture perhaps).  Notice that this is a different way of talking about direction than when we say  "Time marches forward," or when we say, "The temperature is going up." Time nor temperature are not aimed North, South, East, nor West, or any other geographic direction.  "North", "up", and "90deg" are all examples of expressions of direction.

Quantities such as this, while we might not think of them as such, are also scalars, as they may be described completely in terms of a single number (along with a unit).

position:

Position is a spatial location, as described by a point.  It refers to a geometric coordinate location, but not spatial extension or direction.

When describing a position, we might refer to it's location in three-dimensional space, using the symbol p:

p = (0,0,0)  [cartesian coordinates]

p = (38°53'23"N , 77°00'27"W)  [Latitude and Longitude]

This is a familiar enough concept for architects, and I think needs no further explanation other than to say that like the previous two definition, a description of position is relative.  A number of frames of reference are possible for points, the most common of which is the Cartesian Coordinate System, or the familiar (x,y,z) description.  While the cartesian system is built into most CAD packages at such a low level that it may be described as the "world" or "real" coordinate system, alternatives to this frame of reference are possible.

vectors:

Sometimes describing things in terms of any one of the three quantities above will not suffice, and we will want to measure quantities which reflect more than one.  In physics, for example, the measure of velocity refers to both the speed of an object and its direction of travel.  The following statement does not completely explain nor express a velocity:

v = 0.75 m/s

The above statement would read, "The velocity equals 25 meters per second."  The size of the velocity would be 25 meters per second. That, though, is not enough. It turns out that velocities have more that just a size - they also have a direction. For example, a statement correctly states a velocity would say,

v = 0.75 m/s North

Notice that two things are necessary to state a velocity, as size, that is, 25 meters per second, and a direction, North.  It contains both a measurement of direction and magnitude: the direction is the distance of travel, and the magnitude is the speed.  An alternative way of describing this velocity would be to refer to a coordinate system, in much the same way we might when describing position in terms of points.  To describe this same velocity we might say:

v = ( 0, 0.75, 0 ) [in cartesian coordinates]

v = ( 90, 0.75 ) [in polar coordinates]

To visualize how this coordinate description can describe the same velocity as the description above, let's plot this point.  In the image below, we can see how we might be able to describe both a direction (we might imagine "North" to correspond to the y-axis of our coordinate system) and a magnitude (the distance from the center of our coordinate system to the point we've plotted).




If the object we were watching were to slow down, we might describe its velocity as such:

v = 0.75 m/s North

OR

v = ( 0, 0.75, 0 ) [in cartesian coordinates]

OR





Point - Vector Isomorphism

It's important to note that given the Cartesian description of vectors, such as in the explanation above, that there is no mathematical difference between a vector and a point.  Without context, it's impossible to discern the difference between a point at (0,0.5) and a vector at [0,0.5].  This isomorphism can become important when working with vectors and points in many scripting languages, as these two very different things are often described computationally with the same kind of object.

Bound Vectors vs. Free Vectors

A vector is frequently represented by a line segment with a definite direction, or graphically as an arrow.  While we already know that a vector describes merely a direction and magnitude, not a position in space, it is often expedient to represent a vector running around off in space somewhere.  For example, if we wish to describe the relationship between two points in space, we may want to draw the vector as an arrow between these two points directly, even though we know that the actual vector isn't like that at all.  We know from the discussion above, that the "real" vector itself remains "stuck" to the origin, and its position off in space is merely a handy visualization.


This is illustrated in the image above, where a vector between points A and B is represented in two different ways.  The red arrow represents the free vector, or the "actual" vector as it is described mathematically.  The green arrow represents the bound vector, or a visualization of the actual vector repositioned in space to match up with something meaningful; in this case, the startpoint from which it was derived.

While representing vector information as bound vectors is a very handy visualization, it's important to keep in mind what's actually happening behind the scenes.


Vector Manipulation

Vector Summation

To add vectors A and B, take the TAIL of B and move it to the HEAD of A by parallel displacement.





Unit Vectors

A unit vector is simply a vector whose length measures exactly one unit.

Unit vectors are handy when we want to compare some vectors one to the other, without any reference to their relative magnitude.  Taking an existing vector and setting its length to one unit is called "unitization".

Cross Product

The cross product of any two vectors is the vector which is perpendicular to both. 

In a three-dimensional space, any two vectors must necessarily lie in a plane.  The cross product is the normal of this plane. 

For example, if we take the x-axis and y-axis of a Cartesian coordinate system, the cross product of these two vectors is the z-axis.  Furthermore, in that every scenario we discussed above has used two-dimensional vectors, the cross product of any two of the vectors we've discussed is also the z-axis.  This would be the case for any two vectors which lie in the xy-plane.

In many architectural problems, it is handy to be able to construct a perpendicular vector from two existing vectors, and the cross product provides a means for doing so. The cross product is also useful as a measure of "perpendicularness"—the magnitude of the cross product of two vectors is equal to the product of their magnitudes if they are perpendicular and scales down to zero when they are parallel.



Dot Product & Vector Projection

todo

Uses of Vectors in CAD



moving an object based on a vector




a visualization of the tangent vectors of a curve




a visualization of the normal vectors of a surface

















Categories

Configure Widgets