-2

I'm learning Linear algebra/Transformations.

  1. I understand that in Linear algebra, Integration IS a Linear Transform.
  2. I CAN prove it algebrically
  3. BUT I'm CANNOT visualise that Graphically when using Integration as the Linear transform
  4. Properties of a Linear transform
    per Relationship between properties of linear transformations algebraically and visually
    a. Lines remain lines without getting curved
    b. Origin remains fixed in place
    c. Grid lines remain parallel and evenly spaced

I define the transform $\phi$ as the$\int f(x)$ where $f(x)=x$ $$\phi:V \rightarrow W$$ $$f \rightarrow \phi(f) = \int f(x) dx$$ integrating it $$ f'x =\int f(x) = \frac{x^2}{2} $$

But $f'x$ is a Curve; because the Grid lines are NOT evenly spaced i.e Contradicting #2.c above

In the below visualisation

  1. graphs are $f(x)$ and $f'(x)$ respectively.

visualisation here - https://file.io/ozR9YCYKQB6z . Python code to generate visualisation below.

Question:

  1. Since Integration is a Linear mapping: $f'(x)$ should be a straight line? equal grid spacing too?
  2. Appreciate any guidance on where I'm going wrong please.

Thanks in advance!

Python code to generate visualisation

import math

import numpy as np import matplotlib.pyplot as plt

def plot_grid( xmin: float, xmax: float, ymin: float, ymax: float, n_lines: int, line_points: int, map_func, ): """ Plot a transformation of a regular grid.

:param xmin: Minimum x value
:param xmax: Maximum x value
:param ymin: Minimum y value
:param ymax: Maximum y value
:param n_lines: Number of lines per axis
:param line_points: Number of points per line
:param map_func: Function to map the grid points to new coordinates
"""
# List for gathering the lines into.
lines = []

# Iterate over horizontal lines.
for y in np.linspace(ymin, ymax, n_lines):
    lines.append([map_func(x, y) for x in np.linspace(xmin, xmax, line_points)])

# Iterate over vertical lines.
for x in np.linspace(xmin, xmax, n_lines):
    lines.append([map_func(x, y) for y in np.linspace(ymin, ymax, line_points)])

# Iterate over y=x
lines.append([map_func(x, x) for x in np.linspace(xmin, xmax)])

color = "grey"
style = "dotted"
# Plot all the lines.
for i, line in enumerate(lines):
    p = i / (len(lines) - 1)  # Normalize to 0-1.
    # Transpose the list of points for passing to plot.
    xs, ys = zip(*line)
    # Get the line color from the colormap.
    if i == (len(lines)-1):
        color = "black"
        style = "solid"

    plt.plot(xs, ys, color, linestyle=style)


Define some mapping functions.

def identity(x, y): return x, y

def integration(x, y): return (x, yy0.5)

Set up the plot surface...

plt.figure(figsize=(8, 8)) plt.tight_layout()

plt.subplot(2, 2, 1) plt.title("V: f(x)") plot_grid(0, 4, 0, 4, 5, 5, identity)

plt.subplot(2, 2, 2) plt.title("W: f'(x)") plot_grid(0, 4, 0, 4, 5, 5, integration)

plt.show() ```

seven
  • 11
  • 5
    Linear simply means that $\psi (f+cg)$ = $\psi (f) + c\psi (g)$, which is clearly true of integration. Once you leave n dimensional space it is probably best to leave it at that. – Paul Apr 15 '23 at 17:30

1 Answers1

0

There is some fiddliness that I'm going to avoid here dealing with how the indefinite integral isn't actually an operator on the space of integrable functions (because it doesn't return a single function as a result, but an entire family), but the main things to understand are:

  1. Being a linear transformation or linear operator simply means that "linear stuff" passes through unchanged. If $\varphi$ is a linear operator on a vector space $V$ over the real numbers, then for vectors $v, w \in V$ and scalar $c \in \mathbb{R}$, we have $\varphi(v + w) = \varphi(v) + \varphi(w)$ and $\varphi(cv) = c\varphi(v)$.

  2. In a vector space of functions over the reals, the "origin" is just the location of the zero vector, which in turn is the zero function $z(x) \equiv 0$.

  3. In a vector space of functions, a "straight line" is a set of functions of the form $f + tg$, where $f, g$ are functions in the vector space and $t$ is a real number. It doesn't literally mean straight line functions.

So if you think about how integration works, it does satisfy linearity in the sense that $\int (af + bg)(x) dx = a \int f(x) dx + b \int g(x) dx$. In this case, it preserves scalar multiplication because scaling a function up by a constant factor also scales the area underneath it by the same factor, and the area under the sum of two functions is the sum of the area under their individual curves.

ConMan
  • 24,300