Example Problems

Show that the inner product defined above for Rn\mathbb{R}^n as x,y=x1y1+x2y2++xnyn\langle \vec{x}, \vec{y}\rangle = x_1y_1 + x_2y_2 + \cdots + x_ny_n fulfills the 4 properties of an inner product.

Let x,y,zRn\vec{x}, \vec{y}, \vec{z} \in \mathbb{R}^n and αR\alpha \in \mathbb{R}.

  1. x,x=x12+x22+xn2\langle \vec{x}, \vec{x}\rangle = x_1^2 + x_2^2 + \cdots x_n^2.

    Since every component is squared, we know that x,x0\langle \vec{x}, \vec{x}\rangle \geq 0. Let us check when x12+x22+xn2=0x_1^2 + x_2^2 + \cdots x_n^2 = 0. Since we are adding each component squared, all components must be 00 in order for this sum to be 00 as well, i.e. x\vec{x} must be the zero vector. Therefore, x,x=0    x=0\langle \vec{x}, \vec{x}\rangle = 0 \iff \vec{x} = \vec{0}.

Norm

The norm of a vector xV\vec{x} \in V is its length. We denote the norm as x:VR\|\vec{x}\|: V \rightarrow \mathbb{R}.

For vectors in Rn\mathbb{R}^n, to find the length of a vector x=[x1x2xn]\vec{x} = \begin{bmatrix}x_1 \\ x_2 \\ \vdots \\ x_n\end{bmatrix}, we use the Pythagorean theorem.

x=x12+x22++xn2=x,x\|\vec{x}\| = \sqrt{x_1^2 + x_2^2 + \cdots + x_n^2} = \sqrt{\langle \vec{x}, \vec{x}\rangle}

Therefore, we can express the inner product of x\vec{x} with itself as the square of its norm:

x,x=x2\langle \vec{x}, \vec{x}\rangle = \|\vec{x}\|^2

Properties

Norms have to fulfill 3 properties for x,yV\vec{x}, \vec{y} \in V and αR\alpha \in \mathbb{R}:

  1. Nonnegativity: x0\|\vec{x}\| \geq 0, where x=0\|\vec{x}\| = 0 if and only if x=0\vec{x} = \vec{0}

  2. Scaling: αx=αx\|\alpha \vec{x}\| = |\alpha|\|\vec{x}\|

  3. Triangle inequality: x+yx+y\|\vec{x} + \vec{y}\| \leq \|\vec{x}\| + \|\vec{y}\|, where x+y=x+y\|\vec{x} + \vec{y}\| = \|\vec{x}\| + \|\vec{y}\| if and only if x=αy\vec{x} = \alpha\vec{y} (i.e. when x\vec{x} and y\vec{y} are parallel)

Angle

We define the angle θ\theta between 2 vectors x,y\vec{x}, \vec{y} using the following equation:

x,y=xycosθ\langle \vec{x}, \vec{y}\rangle = \|\vec{x}\|\|\vec{y}\|\cos\theta

cosθ=x,yxy\cos\theta = \frac{\langle \vec{x}, \vec{y}\rangle}{\|\vec{x}\|\|\vec{y}\|}

Angle between 2 vectors

Last updated