Linear algebra part 5 - Vector lengths
The length, or magnitude, of a vector is the length of the vector line on a graph. If you need a refresher, look at the post on plotting vectors. We denotes the length of a vector as . The length of a vector, , is calculated using this formula:
What we are saying here is that you calculate the length of a vector by squaring each component, adding them up, then taking the square root of the result. I hope that might sound familiar to some of you. If you look at a two-dimensional vector on a graph, it is essentially a right-angle triangle. The formula we have just stated is Pythagoras’ theorem. To prove to ourselves that this is true, let us look at an example in two-dimensions.
If we plot the vector we can see that it is the hypotenuse of a right-angle triangle.
Pythagoras’ theorem tells us that where and are the two sides at right angles to each other, and is the hypotenuse. The length of the hypotenuse is therefore . Looking at our graph, we can see that is the x-axis component of our vector and is the y-axis component of our vector. We can therefore calculate the length of the vector as follows:
Vector lengths in more than two dimensions
As we showed in the formula at the top of the post, this format works in as many dimensions as you like. Let us walk through an example in five demensions:
Problems
If you can solve this problem you have understood how to calculate the length of vectors.
- Calculate the length of vector :
Solutions
- The length of a vector is calculated by squaring each component of the vector, adding up the resulting components, then square routing the result.