×

Inner Product

We will prove that:

For any two vectors in $$\mathbb{R}^n$$, $$\vec{x}$$ and $$\vec{y}$$:

$$\vec{x} \cdot \vec{y} = |\vec{x}||\vec{y}| \cos(\phi)$$

Where $$\phi$$ is the angle between $$\vec{x}$$ and $$\vec{y}$$ and $$\vec{x} \cdot \vec{y}$$ is the Euclidean inner product.

Proof:

Consider any triangle in $$\mathbb{R}^n$$ with sides $$\vec{x}$$, $$\vec{y}$$ and $$\vec{c}$$. Let $$\phi$$ be the angle between $$\vec{x}$$ and $$\vec{y}$$ and let $$\vec{c} = \vec{y} - \vec{x}$$. (Since this is a triangle, such a $$\vec{c}$$ must exist)

Define the Euclidean inner product: $$\vec{a} \cdot \vec{b} = \displaystyle \sum_{i=1}^n a_ib_i$$

Where $$a_i$$ and $$b_i$$ are the components of $$\vec{a}$$ and $$\vec{b}$$, respectively.

Finally define the components of $$\vec{x}$$ and $$\vec{y}$$:

$$\vec{x}= <x_1,...,x_n>$$

$$\vec{y} = <y_1,...,y_n>$$

By the Law of Cosines, we have:

$$|\vec{c}|^2 = |\vec{x}|^2 + |\vec{y}|^2 -2|\vec{x}||\vec{y}|\cos(\phi)$$

$$\Rightarrow$$ $$|\vec{y} - \vec{x}|^2 = |\vec{x}|^2 + |\vec{y}|^2 -2|\vec{x}||\vec{y}|\cos(\phi)$$

Let us express this in terms of vector components. We have:

$$\displaystyle \sum_{i=1}^n (y_i -x_i)^2 = \displaystyle \sum_{i=1}^n x_i^2 + \displaystyle \sum_{i=1}^n y_i^2 - 2 \sqrt{ \left( \displaystyle \sum_{i=1}^n x_i^2 \right)\left(\displaystyle \sum_{i=1}^n y_i^2 \right)} \cos(\phi)$$

$$\Rightarrow$$ $$\displaystyle \sum_{i=1}^n (y_i - x_i)^2 -x_i^2 -y_i^2 = -2 \sqrt{ \left( \displaystyle \sum_{i=1}^n x_i^2 \right)\left(\displaystyle \sum_{i=1}^n y_i^2 \right)} \cos(\phi)$$

Expanding the grouped term on the left:

$$\displaystyle \sum_{i=1}^n y_i^2 - 2y_ix_i +x_i^2 -x_i^2 - y_i^2 = -2 \sqrt{ \left( \displaystyle \sum_{i=1}^n x_i^2 \right)\left(\displaystyle \sum_{i=1}^n y_i^2 \right)} \cos(\phi)$$

$$\Rightarrow$$ $$-2 \displaystyle \sum_{i=1}^n y_ix_i = -2 \sqrt{ \left( \displaystyle \sum_{i=1}^n x_i^2 \right)\left(\displaystyle \sum_{i=1}^n y_i^2 \right)} \cos(\phi)$$

$$\Rightarrow$$ $$\displaystyle \sum_{i=1}^n y_ix_i = \sqrt{ \left( \displaystyle \sum_{i=1}^n x_i^2 \right)\left(\displaystyle \sum_{i=1}^n y_i^2 \right)} \cos(\phi)$$

$$\Rightarrow$$ $$\vec{x} \cdot \vec{y} = |\vec{x}||\vec{y}| \cos(\phi)$$

QED

Note by Ethan Robinett
3 years, 5 months ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$