ELIAS EBNER

  • Home
  • Blog
  • Courses
  • About

Linear Algebra

  • Vectors
    • Scalars
    • Vectors vs Sets
    • Addition and Subtraction
    • Scalar Multiplication
    • Zero Vectors
    • Linear Combinations
    • Real Dot Product
    • Length of a Vector
    • Orthogonal Vectors
    • Parallel Vectors

Length of a Vector

The length - sometimes called norm - of a vector v⃗\vec{v}v, denoted by the symbol ∥v⃗∥\lVert \vec{v} \rVert∥v∥, can be computed by using the dot product operation.

We remind ourselves of the pythagorean theorem

a2+b2=c2, a^2 + b^2 = c^2,a2+b2=c2,

which allows us to compute the length of the hypotenuse ccc of a right-angled triangle in terms of its catheti (the other two sides).

This applies well to our use-case. For simplicity, I will stick to two dimensions for now.

We consider the following vector v⃗\vec{v}v:

v⃗=[v1v2].\vec{v} = \begin{bmatrix} v_1 \\ v_2 \end{bmatrix}.v=[v1​v2​​].

We can think of ∥v⃗∥\lVert \vec{v} \rVert∥v∥ as the hypotenuse of a right-angled triangle. Its components - in this case v1v_1v1​ and v2v_2v2​ respectively - form the two catheti:

According to the pythagorean theorem, the length of the vector would be given by

∥v⃗∥=v12+v22.\lVert \vec{v} \rVert = \sqrt{v_1^2 + v_2^2}.∥v∥=v12​+v22​​.

The same idea applies to vectors with more dimensions. But how can we generalize this? We can write this by using the dot product. We take the dot product of the vector v⃗\vec{v}v with itself and take the square root of the result:

∥v⃗∥=v⃗⋅v⃗.\lVert \vec{v} \rVert = \sqrt{\vec{v} \cdot \vec{v}}.∥v∥=v⋅v​.

If we expand this, we see that we get exactly the pythagorean theorem:

v⃗⋅v⃗=[v1v2]⋅[v1v2]=v1v1+v2v2=v12+v22.\begin{align*} \sqrt{\vec{v} \cdot \vec{v}} &= \sqrt{ \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} \cdot \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} } \\ &= \sqrt{v_1 v_1 + v_2 v_2} \\ &= \sqrt{v_1^2 + v_2^2}. \end{align*}v⋅v​​=[v1​v2​​]⋅[v1​v2​​]​=v1​v1​+v2​v2​​=v12​+v22​​.​

The same applies to vectors with more than two dimensions. Consider a different vector

w⃗=[w1w2w3].\vec{w} = \begin{bmatrix} w_1 \\ w_2 \\ w_3 \end{bmatrix}.w=​w1​w2​w3​​​.

We observe that

w⃗⋅w⃗=[w1w2w3]⋅[w1w2w3]=w1w1+w2w2+w3w3=w12+w22+w32.\begin{align*} \sqrt{\vec{w} \cdot \vec{w}} &= \sqrt{ \begin{bmatrix} w_1 \\ w_2 \\ w_3 \end{bmatrix} \cdot \begin{bmatrix} w_1 \\ w_2 \\ w_3 \end{bmatrix} } \\ &= \sqrt{w_1 w_1 + w_2 w_2 + w_3 w_3} \\ &= \sqrt{w_1^2 + w_2^2 + w_3^2}. \end{align*}w⋅w​​=​w1​w2​w3​​​⋅​w1​w2​w3​​​​=w1​w1​+w2​w2​+w3​w3​​=w12​+w22​+w32​​.​

Example

Let us compute the length of an example vector. Take

v⃗=[−3−4]∥v⃗∥=v⃗⋅v⃗=[−3−4]⋅[−3−4]=(−3)2+(−4)2=25=5\begin{align*} \vec{v} &= \begin{bmatrix} -3 \\ -4 \end{bmatrix} \\\\ \lVert \vec{v} \rVert &= \sqrt{\vec{v} \cdot \vec{v}} \\ &= \sqrt{ \begin{bmatrix} -3 \\ -4 \end{bmatrix} \cdot \begin{bmatrix} -3 \\ -4 \end{bmatrix} } \\ &= \sqrt{(-3)^2 + (-4)^2} \\ &= \sqrt{25} \\ &= 5 \end{align*}v∥v∥​=[−3−4​]=v⋅v​=[−3−4​]⋅[−3−4​]​=(−3)2+(−4)2​=25​=5​
This website does not collect personal data, does not use cookies, and does not perform any tracking.