Vector Length Explained: Geometric Proof and Intuition
In this article, we will learn how to calculate the length of a vector. Length of a vector also called as “magnitude of a vector” or “norm of a vector”. Also we will understand this from both geometric and algebraic interpretation.
Algebraic Interpretation of Length of a Vector
The way to denote the length of a vector is using these 2 thin lines on either side of the vector.
To find the length of a vector, you just need to calculate the square root of the dot product of the vector v with itself.
Ok, but you might ask, why this equation to find the length of a vector?
Let’s find out by learning it from geometric perspective.
Let’s take a vector:
In the video, we first move 2 units along the x-axis and then 3 units along the y-axis. Connecting the starting point to the ending point gives us the vector v.
Just by looking at it, we can already say that the vector is at least 3 units long.
To find its exact length, we use Pythagoras’ theorem, since the x- and y-components form a right-angled triangle.
By Pythagoras theorem, the square of the length of the vector is the sum of the squares of its perpendicular components:
Taking the square root gives the length of the vector:
Hence, the length is 3.6. This validates our intuitive reasoning of the length of the vector must be greater than 3.
More generally, if a vector
then the same geometric argument gives:
And since
we finally arrive at the vector length equation:
I hope this gives you a clear understanding of why we have the vector length equation like this.
Now, lets find vector length in python and then we will wrap up.
Vector Length in Python
First, import the usual stuff:
import numpy as np
import matplotlib.pyplot as plt
# a vector
v1 = np.array([ 1, 2, 3, 4, 5, 6 ])
# take the norm
vl2 = np.linalg.norm(v1)
print(vl2)
We create a vector v1 with 6 components. Then we use NumPy’s linalg.norm() function to calculate its length (or magnitude).
Behind the scenes, np.linalg.norm() is doing exactly what we learned.
This works for vectors of any dimension, whether it’s a 2D vector like our earlier example or a high-dimensional vector like this 6D one. NumPy handles all the computation for us
I hope you understood about vector length with a clear understanding. In the next article, we will finally understand the geometric perspective of dot product of two vectors. Till then, Goodbye!

