Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 15

Inner Products: Norms and Distances

Recommended resources

Hello! Welcome back to our study of inner product spaces.

In the last lesson, we laid the groundwork by defining real and complex inner products. We saw that the crucial property of positive-definiteness ensures that the inner product of a vector with itself, , is always a non-negative real number. This is not just a mathematical curiosity; it's the very property that allows us to build a meaningful notion of geometry.

Today, we'll cash in on that work. We will use the inner product to formally define and compute the norm (length) of a vector and the distance between two vectors. This will allow us to take the abstract algebraic structure of an inner product and use it to answer concrete geometric questions like "How long is this vector?" or "How far apart are these two functions?" in any inner product space.

1. Defining the Norm of a Vector

You're familiar with the length of a vector in from the Pythagorean theorem: . Notice that the term inside the square root, , is precisely the dot product .

This insight is the basis for generalizing the concept of length to any inner product space.

The norm of a vector in an inner product space is defined as:

Thanks to the positive-definiteness axiom, we know , so we are always taking the square root of a non-negative real number. The result, , is the generalized "length" of the vector.

The following video provides a clear introduction to this definition and how it relates to our geometric intuition.

Linear Algebra 6.1.1 Inner Product, Vector Length and Distance

This video by Kimberly Brehm introduces the concepts of vector length (norm) and distance, starting from the familiar dot product.

Watch from 06:06 to 07:22. This segment defines the length or norm of a vector and visually connects it to the Pythagorean theorem in 2D.


2. Computing Norms in Real and Complex Spaces

Let's see how this definition works in practice for the standard inner products we discussed.

The Standard Norm in (Euclidean Norm)

For a real vector , the standard inner product is the dot product, . The induced norm is:

This is the familiar Euclidean length. For example, if in , its norm is:

The Standard Norm in

This is particularly important for your goal of studying quantum mechanics. For a complex vector , the standard inner product is . The induced norm is:

Let's compute the norm for in .
First, we find the squared moduli of the components:

Now, we compute the norm:

The following text provides a concise summary and examples for computing these standard norms.

Norm of a vector

The StatLect article "Norm of a vector" gives clear, formulaic examples for calculating the norm of both real and complex vectors induced by their standard inner products.

Read the two short sections titled "Example: the norm of a real array" and "Example: the norm of a complex array". These will reinforce the calculations we just did.

Test your understanding!

In quantum computing, a qubit state can be represented by a vector with norm 1. Consider the state . What must the value of be for to equal 1?

Show answer

We need . The squared norm is the inner product of the vector with itself:

First, we calculate the second term:

Now, substitute this back into the equation:

Therefore, .


3. Defining Distance Between Vectors

With a norm in hand, defining the distance between two vectors is straightforward. Geometrically, the distance between two points (at the tips of vectors and ) is the length of the vector connecting them. This connecting vector is simply their difference, .

The distance between two vectors and , denoted , is defined as the norm of their difference:

Since , the distance is also fundamentally derived from the inner product.

Let's watch a video that illustrates this and works through an example.

Linear Algebra 6.1.1 Inner Product, Vector Length and Distance

Let's return to the Kimberly Brehm video, which now explains how distance is derived from the norm.

Watch from 07:22 to 12:24. The video provides a great visual for why distance is the norm of the difference and then computes the distance between two vectors in \mathbb{R}^2 and \mathbb{R}^3.


4. Norms and Distances from Other Inner Products

The true power of these definitions becomes apparent when we use inner products that aren't the standard dot product. The geometry of the space—what we consider to be length and distance—changes with the inner product.

Example: A Weighted Inner Product

In the last lesson, we saw that defines a valid inner product on . Let's calculate a norm and distance in this "weighted" space.

Let .
Its Euclidean norm would be .
But its norm induced by our weighted inner product is:

The "length" of the vector is different in this new geometry!

Example: An Inner Product on a Function Space

For your background in calculus, this should be particularly interesting. Consider the space of continuous functions on , with the inner product . Let's find the "length" of the function .

So, the norm is . We have successfully calculated the length of a function!

The next video demonstrates exactly these kinds of calculations, showing why the general definition is so essential.

Linear Algebra: Inner Product Spaces (Sec. 5.2 Part 1)

This video by Frank Forte directly addresses why we need a generalized norm definition when dealing with non-standard inner products, and provides examples with both weighted and function-space inner products.

Watch from 15:41 to 22:59. The video first motivates the need for the general definition, then computes a norm with a weighted inner product, a distance using that same inner product, and finally a norm in a function space using an integral.


5. A Broader View: The Axioms of a Norm

So far, we've only talked about norms that are induced by an inner product. However, the concept of a norm is more general. A function is a norm if it satisfies three axioms, regardless of whether it comes from an inner product.

  1. Definiteness: , and if and only if .
  2. Absolute Homogeneity: for any scalar .
  3. Triangle Inequality: .

Any norm induced by an inner product automatically satisfies these properties. (Proving the triangle inequality requires the famous Cauchy-Schwarz inequality, which we will encounter soon).

However, some norms used in machine learning do not come from an inner product. For example:

  • 1-norm (Manhattan norm):
  • -norm (Max norm):

The standard Euclidean norm is also called the 2-norm, . These different norms are crucial for techniques like regularization in deep learning. The image below shows what the "unit circle" (the set of all vectors with norm 1) looks like for the 2-norm and 1-norm.

Geometric Interpretation of 1-norm and 2-norm
Geometric interpretation of vectors with a constant norm of 1 in 2D. The familiar circle corresponds to the 2-norm (Euclidean norm), which comes from an inner product. The diamond shape corresponds to the 1-norm, which does not.

While these other norms are important, our primary focus in this module will remain on the geometry generated by inner products.


Conclusion

In this lesson, we made the crucial connection between the algebraic definition of an inner product and the geometric concepts of length and distance.

Key Takeaways:

  • The norm (length) of a vector in an inner product space is defined as .
  • The distance between two vectors and is the norm of their difference: .
  • These definitions hold for any inner product, whether it's the standard dot product, a weighted product, or one defined by an integral. The specific inner product defines the geometry of the space.
  • The norm induced by an inner product is just one type of norm; other norms (like the 1-norm) are also useful, especially in machine learning.

Preview of the Next Lesson:

The inner product gives us one more fundamental geometric tool: a way to measure angles, which leads to the concept of orthogonality (perpendicularity). In the next lesson, we will define orthogonality in general inner product spaces and see why it is one of the most powerful ideas in all of linear algebra.