Waste less time on Facebook — follow Brilliant.

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.


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)\)


Note by Ethan Robinett
2 years, 2 months ago

No vote yet
1 vote


There are no comments in this discussion.


Problem Loading...

Note Loading...

Set Loading...