

# Defining inner product spaces

An inner product space is a vector space equipped with an inner product, which is a function that takes two vectors as input and returns a scalar value. The inner product satisfies certain properties, such as linearity in the first argument and conjugate symmetry in the second argument.

Consider the vector space of all real-valued functions on a set $X$. We can define an inner product on this space by

$$\langle f, g \rangle = \int_X f(x) \overline{g(x)} \, dx$$

where $\overline{g(x)}$ denotes the complex conjugate of $g(x)$. This is an example of an inner product space.

## Exercise
Define an inner product on the space of all $n \times n$ matrices with real entries.

# Examples of inner product spaces

There are many examples of inner product spaces in mathematics and physics. Some common examples include:

- The space of all square-integrable functions on a set $X$ with the inner product defined as above.
- The space of all $n \times 1$ column vectors with real entries, equipped with the standard inner product.
- The space of all $n \times n$ Hermitian matrices, equipped with the inner product defined as the Frobenius norm.

## Exercise
Find an inner product on the space of all polynomials of degree at most $n$ with real coefficients.

# Properties of inner product spaces

Inner product spaces have several important properties:

- Linearity in the first argument: $\langle \alpha f + \beta g, h \rangle = \alpha \langle f, h \rangle + \beta \langle g, h \rangle$ for all scalars $\alpha, \beta$ and vectors $f, g, h$.
- Conjugate symmetry: $\langle f, g \rangle = \overline{\langle g, f \rangle}$ for all vectors $f, g$.
- Positive definiteness: $\langle f, f \rangle \geq 0$ for all vectors $f$, with equality if and only if $f = 0$.
- Orthogonality: $\langle f, g \rangle = 0$ for all vectors $f, g$ if and only if $f$ and $g$ are orthogonal.

## Exercise
Prove that the inner product defined in section 1 satisfies all the properties mentioned above.

# Orthogonality in inner product spaces

Orthogonality is a fundamental concept in inner product spaces. Two vectors $f$ and $g$ are orthogonal if their inner product is zero: $\langle f, g \rangle = 0$.

In the example of inner product spaces in section 1, the functions $f(x) = 1$ and $g(x) = x$ are orthogonal because

$$\langle f, g \rangle = \int_0^1 1 \cdot \overline{x} \, dx = 0$$

## Exercise
Find two orthogonal vectors in the space of all $n \times 1$ column vectors with real entries.

# Linear maps and their properties

A linear map is a function between vector spaces that preserves the structure of vector addition and scalar multiplication. In an inner product space, linear maps have several important properties:

- Preservation of inner products: $\langle T(f), T(g) \rangle = \langle f, g \rangle$ for all vectors $f, g$ and linear maps $T$.
- Preservation of orthogonality: $T(f)$ and $T(g)$ are orthogonal if and only if $f$ and $g$ are orthogonal.

## Exercise
Find a linear map between two inner product spaces that preserves inner products and orthogonality.

# Orthogonal bases

An orthogonal basis is a set of orthogonal vectors that span an inner product space. In an inner product space, every vector can be expressed as a linear combination of the basis vectors.

In the example of inner product spaces in section 1, the functions $f_1(x) = 1$ and $f_2(x) = x$ form an orthogonal basis because $\langle f_1, f_2 \rangle = 0$.

## Exercise
Find an orthogonal basis for the space of all $n \times 1$ column vectors with real entries.

# Norms and their properties

A norm is a function that assigns a non-negative real number to each vector in an inner product space. The norm is related to the inner product through the Cauchy-Schwarz inequality:

$$\vert \langle f, g \rangle \vert \leq \Vert f \Vert \Vert g \Vert$$

for all vectors $f, g$.

In the example of inner product spaces in section 1, the norm is defined as the square root of the integral of the square of the function:

$$\Vert f \Vert = \sqrt{\int_0^1 f(x)^2 \, dx}$$

## Exercise
Find a norm on the space of all $n \times 1$ column vectors with real entries.

# Distance in inner product spaces

The distance between two vectors $f$ and $g$ in an inner product space is defined as

$$\Vert f - g \Vert = \sqrt{\langle f - g, f - g \rangle}$$

In the example of inner product spaces in section 1, the distance between the functions $f(x) = 1$ and $g(x) = x$ is

$$\Vert f - g \Vert = \sqrt{\int_0^1 (1 - x)^2 \, dx}$$

## Exercise
Find the distance between two vectors in the space of all $n \times 1$ column vectors with real entries.

# Applications of inner product spaces and functions

Inner product spaces and functions have numerous applications in mathematics, physics, and engineering. Some examples include:

- Fourier analysis: The inner product is used to define the dot product of functions, which is related to the orthogonality of the basis functions.
- Optimization: Inner product spaces and functions are used to define the concept of distance and to solve optimization problems.
- Quantum mechanics: Inner product spaces and functions are used to define the inner product of wave functions and to describe the behavior of quantum systems.

## Exercise
Discuss an application of inner product spaces and functions in your field of study.

# Review and practice problems

In this textbook, we have covered the following topics:

- Defining inner product spaces
- Examples of inner product spaces
- Properties of inner product spaces
- Orthogonality in inner product spaces
- Linear maps and their properties
- Orthogonal bases
- Norms and their properties
- Distance in inner product spaces
- Applications of inner product spaces and functions

## Exercise
Solve the following problems to review your understanding of the material:

1. Find an inner product on the space of all $n \times n$ matrices with real entries.
2. Find two orthogonal vectors in the space of all $n \times 1$ column vectors with real entries.
3. Find a linear map between two inner product spaces that preserves inner products and orthogonality.
4. Find an orthogonal basis for the space of all $n \times 1$ column vectors with real entries.
5. Find a norm on the space of all $n \times 1$ column vectors with real entries.
6. Find the distance between two vectors in the space of all $n \times 1$ column vectors with real entries.
7. Discuss an application of inner product spaces and functions in your field of study.

The solutions to the problems are as follows:

1. The inner product on the space of all $n \times n$ matrices with real entries can be defined as

$$\langle A, B \rangle = \text{tr}(A^T B)$$

where $A^T$ denotes the transpose of $A$.

2. Two orthogonal vectors in the space of all $n \times 1$ column vectors with real entries are

$$v_1 = \begin{bmatrix} 1 \\ 0 \\ \vdots \\ 0 \end{bmatrix}, \quad v_2 = \begin{bmatrix} 0 \\ 1 \\ \vdots \\ 0 \end{bmatrix}$$

3. A linear map that preserves inner products and orthogonality is the identity map.

4. An orthogonal basis for the space of all $n \times 1$ column vectors with real entries is the standard basis.

5. A norm on the space of all $n \times 1$ column vectors with real entries is the Euclidean norm:

$$\Vert v \Vert = \sqrt{v^T v}$$

6. The distance between two vectors in the space of all $n \times 1$ column vectors with real entries is

$$\Vert v_1 - v_2 \Vert = \sqrt{(v_1 - v_2)^T (v_1 - v_2)}$$

7. One application of inner product spaces and functions is in quantum mechanics, where they are used to define the inner product of wave functions and to describe the behavior of quantum systems.