# 4.3: Inner Product and Euclidean Norm

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$

( \newcommand{\kernel}{\mathrm{null}\,}\) $$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\id}{\mathrm{id}}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\kernel}{\mathrm{null}\,}$$

$$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$

$$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$

$$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$

The inner product $$(x,y)$$ between vectors $$x$$ and $$y$$ is a scalar consisting of the following sum of products:

$(x,y) = x_1y_1+x_2y_2+x_3y_3+⋯+x_ny_n \nonumber$

This definition seems so arbitrary that we wonder what uses it could possibly have. We will show that the inner product has three main uses:

1. computing length or “norm”,
2. finding angles between vectors and checking for “orthogonality”, and
3. computing the “component of one vector along another” (projection).

Since the inner product is so useful, we need to know what algebraic operations are permitted when we are working with inner products. The following are some properties of the inner product. Given $$x,y,z\;∈\;\mathbb{R}^n$$ and $$a\;∈\;\mathbb{R}$$,

1. $$(x,y)=(y,x)$$;
2. $$(ax,y)=a(x,y)=(x,ay)$$; and
3. $$(x,y+z)=(x,y)+(x,z)$$.

Exercise $$\PageIndex{1}$$

Prove the three preceding properties by using the definition of inner product. Is the equation $$x(y,z)=(x,y)z$$ also a true property? Prove or give a counterexample.

## Euclidean Norm

Sometimes we want to measure the length of a vector, namely, the distance from the origin to the point specified by the vector's coordinates. A vector's length is called the norm of the vector. Recall from Euclidean geometry that the distance between two points is the square root of the sum of the squares of the distances in each dimension. Since we are measuring from the origin, this implies that the norm of the vector x is

$||x||=\sqrt{x^2_1+x^2_2+...+x^2_n} \nonumber$

Notice the use of the double vertical bars to indicate the norm. An equivalent definition of the norm, and of the norm squared, can be given in terms of the inner product:

$||x||=\sqrt{(x,x)} \nonumber$

or

$||x||^2=(x,x) \nonumber$

##### Example $$\PageIndex{1}$$

The Euclidean norm of the vector

$$x=\begin{bmatrix} 1\\3\\5\\−2 \end{bmatrix}$$

is $$||x||=\sqrt{1^2+3^2+5^2+(−2)^2}=\sqrt{39}$$

An important property of the norm and scalar product is that, for any $$x\;∈\;\mathbb{R}^n$$ and $$a\;∈\;\mathbb{R}$$,

$||ax||=|a|||x|| \nonumber$

So we can take a scalar multiplier outside of the norm if we take its absolute value.

Exercise $$\PageIndex{2}$$

Prove $$||ax||=|a|||x||$$

## Cauchy-Schwarz Inequality

Inequalities can be useful engineering tools. They can often be used to find the best possible performance of a system, thereby telling you when to quit trying to make improvements (or proving to your boss that it can't be done any better). The most fundamental inequality in linear algebra is the Cauchy-Schwarz inequality. This inequality says that the inner product between two vectors $$x$$ and $$y$$ is less than or equal (in absolute value) to the norm of $$x$$ times the norm of $$y$$, with equality if and only if $$y=αx$$:

$|(x,y)|≤||x||\;||y|| \nonumber$

To prove this theorem, we construct a third vector $$z=λx−y$$ and measure its norm squared:

$||λx−y||^2=(λx−y,λx−y)=λ^2||x||^2−2λ(x,y)+||y||^2≥0 \nonumber$

So we have a polynomial in $$λ$$ that is always greater than or equal to 0 (because every norm squared is greater than or equal to 0). Let's assume that $$x$$ and $$y$$ are given and minimize this norm squared with respect to $$λ$$. To do this, we take the derivative with respect to $$λ$$ and equate it to 0:

$2λ||x||^2−2(x,y)=0\;⇒\;λ=\frac{(x,y)} {||x||^2} \nonumber$

When this solution is substituted into the formula for the norm squared in Equation$$\PageIndex{7}$$, we obtain

$\begin{bmatrix} \frac {(x,y)} {||x||^2}\end{bmatrix}^2\;||x||^2−\frac {2(x,y)} {||x||^2} (x,y)+||y||^2≥0 \nonumber$

which simplifies to

$-\frac {(x,y)^2} {||x||^2} + ||y||^2 ≥ 0 ⇒ (x,y)^2 ≤ ||x||^2||y||^2 \nonumber$

The proof of the Cauchy-Schwarz inequality is completed by taking the positive square root on both sides of the above Equation. When $$y=αx$$, then

$(x,y)^2=(x,αx)^2=[|α|(x,x)]^2=(|α|||x||^2)^2 \nonumber$

$=(|α|^2||x||^2)||x||^2 \nonumber$

$=(αx,αx)||x||^2 \nonumber$

$=(y,y)||x||^2 \nonumber$

$=||y||^2||x|^|2 \nonumber$

which shows that equality holds in Equation $$\PageIndex{6}$$ when y is a scalar multiple of x.

Exercise $$\PageIndex{3}$$

Use the Cauchy-Schwarz inequality to prove the triangle inequality, which states

$$||x+y||≤||x||+||y||$$

Explain why this is called the triangle inequality.

This page titled 4.3: Inner Product and Euclidean Norm is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Louis Scharf (OpenStax CNX) via source content that was edited to the style and standards of the LibreTexts platform.