Machine learning: Exercise: integral transforms

Functions and linear transformations #

Background #

When we talk about vector spaces, we usually think of something like \(\mathbb{R}^n\). In that setting, every linear transformation can be encoded as a matrix. But continuous functions are another, much more interesting, vector space. In this exercise, I would like us to think about the following:

Main question: What do linear transformations look like when the vector space at hand is the set of continuous functions, say \(\mathcal{C}[a,b]\)?

Definitions #

Put simply, a vector space is a set where we can add objects and multiply them by scalars and can expect reasonable algebraic properties to hold. A result in analysis shows that continuous functions form a vector space.

Exercise: If \(V\) and \(W\) are real vector spaces, recall the definition of a linear transformation \(A: V \rightarrow V \) Hint: it is usually stated in terms of two properties.
Solution

A linear transformation \(A\) on a vector space \(V\) is a function \(A: V \rightarrow W\) that satisfies two properties:

  • \(A(x+y) = A(x) + A(y) \) for all \(x,y \in V\), and
  • \(A(\alpha x) = \alpha A(x)\) for all \(x \in V\) and \(\alpha \in \mathbb{R}\).

The properties of a linear transformation are exactly the properties of matrices when they are applied to vectors in \(\mathbb{R}^n\). But in your mathematics career, it turns out that you have seen other examples of linear transformations.

Linear transformations on function spaces #

Work through the follow exercise designed to generate some examples of linear transformations in this setting.

Exercise:

Consider the vector space of continuous functions, say \( f \in \mathcal{C}[a,b]\). Are the following linear transformations?

  • \(A(f) = f + 2 \)
  • \(A(f)) = \alpha \cdot f\) for a fixed \(\alpha \in \mathbb{R}\)
  • \(A(f) = f(x)\) for a fixed \(x \in [a,b]\). This transformation is often called the evaluation map.

Describe a few more linear transformations on the space \(\mathcal{C}[a,b]\). Start by looking for something very simple and then increase in sophistication until you run out of ideas.

Solution

The first is not a linear transformation, it fails to satisfy both the defining equations. The second and third ones are linear.

Another linear transformation is the definite integral. The derivative is one, but we’d have to change the domain to include only differentiable functions.

Once you have spent some time thinking about the above, consider the following definition. It may provide you with additional inspiration:

Definition: The cosine transform takes a function \(f\) and defines another function \(\hat{f}\) by the following formula: \[\hat{f}(x) = \int_{-\infty}^\infty f(y) \cos(xy) \; dy\]

It is a theorem that this new function \(\hat{f}\) is continuous. The cosine transform has a broad set of applications especially in the field of signal processing. Image compression using the .jpeg standard is one.

Exercise: Is the cosine transform a linear transformation? What is cosine was replaced by another function?
Solution
Indeed it is! For instance: \[ \widehat{(f+g)}(x) = \int (f+g)(y) \cos (xy) \; dy = \int f(y) \cos(xy) \; dy + \int g(y) \cos(xy) \; dy = \\ = \hat{f}(x) + \hat{g}(x)\] Note the weird hat notation for this transformation. It is fairly standard. And note that there was nothing special about our choice of cosine!

We will continue our discussion of linear transformations on spaces of functions in class.