# The Unapologetic Mathematician

## Inner Products and Angles

We again consider a real vector space $V$ with an inner product. We’re going to use the Cauchy-Schwarz inequality to give geometric meaning to this structure.

First of all, we can rewrite the inequality as

$\displaystyle\frac{\langle v,w\rangle^2}{\langle v,v\rangle\langle w,w\rangle}\leq1$

Since the inner product is positive definite, we know that this quantity will be positive. And so we can take its square root to find

$\displaystyle-1\leq\frac{\lvert\langle v,w\rangle\rvert}{\langle v,v\rangle^{1/2}\langle w,w\rangle^{1/2}}\leq1$

This range is exactly that of the cosine function. Let’s consider the cosine restricted to the interval $\left[0,\pi\right]$, where it’s injective. Here we can define an inverse function, the “arccosine”. Using the geometric view on the cosine, the inverse takes a value between $-1$ and ${1}$ and considers the point with that $x$-coordinate on the upper half of the unit circle. The arccosine is then the angle made between the positive $x$-axis and the ray through this point, as a number between ${0}$ and $\pi$.

So let’s take this arccosine function and apply it to the value above. We define the angle $\theta$ between vectors $v$ and $w$ by

$\displaystyle\cos(\theta)=\frac{\lvert\langle v,w\rangle\rvert}{\langle v,v\rangle^{1/2}\langle w,w\rangle^{1/2}}$

Some immediate consequences show that this definition makes sense. First of all, what’s the angle between $v$ and itself? We find

$\displaystyle\cos(\theta)=\frac{\lvert\langle v,w\rangle\rvert}{\langle v,v\rangle^{1/2}\langle v,v\rangle^{1/2}}=1$

and so $\theta=0$. A vector makes no angle with itself. Secondly, what if we take two vectors from an orthonormal basis $\left\{e_i\right\}$? We calculate

$\displaystyle\cos(\theta_{ij})=\frac{\lvert\langle e_i,e_j\rangle\rvert}{\langle e_i,e_i\rangle^{1/2}\langle e_j,e_j\rangle^{1/2}}=\delta_{ij}$

If we pick the same vector twice, we already know we get $\theta_{ii}=0$, but if we pick two different vectors we find that $\cos(\theta_{ij})=0$, and thus $\theta_{ij}=\frac{\pi}{2}$. That is, two different vectors in an orthonormal basis are perpendicular, or “orthogonal”.

### Like this:

Posted by John Armstrong | Algebra, Geometry, Linear Algebra

## 15 Comments	»

1. [...] vector space with an inner product. We used the Cauchy-Schwarz inequality to define a notion of angle between two [...]

Pingback by | April 21, 2009 | Reply

2. [...] now we do get a notion of length, defined by setting as before. What about angle? That will depend directly on the Cauchy-Schwarz inequality, assuming it holds. We’ll check [...]

Pingback by | April 22, 2009 | Reply

3. [...] Now that we have a real or complex inner product, we have notions of length and angle. This lets us define what it means for a collection of vectors to be “orthonormal”: [...]

Pingback by | April 28, 2009 | Reply

4. Dear John,

The law of cosines argument is also nice (especially since you now have the polarization identities): ||u-v||^2 = ||u||^2 + ||v||^2 + 2||u|| ||v|| cos @. Then 2=||u-v||^2 – ||u||^2 – ||v||^2 = 2||u|| ||v|| cos @, and you divide both sides by 2||u|| ||v||.

There is an interesting way to define cosine in terms of an inner product (though it’s not completely germane to this topic). Since the group of plane rotations SO_2(R) is an infinite group with subgroups of arbitrary finite order, it makes a good definition for the group of angles. Usually angles are written additively, so we define the group of angles A to be SO_2(R) written additively. Obviously A and SO_2(R) are isomorphic. If T is the image of an angle @, then we define cos @ := , where x is a fixed unit vector. If x and y are vectors, then there is a rotation T (in the plane spanned by x and y) such that y = Tx, and so /(||x|| ||y||) is the cosine of the angle corresponding to T.

-Brendan

Comment by Brendan Murphy | April 29, 2009 | Reply

5. Sorry, it didn’t like the symbols I used for inner product.

The third line should read: “2(u,v)=||u-v||^2 – ||u||^2 – ||v||^2 = 2||u|| ||v|| cos @”.

The second paragraph should end with: “If T is the image of an angle @, then we define cos @ :=(Tx,x) , where x is a fixed unit vector. If x and y are vectors, then there is a rotation T (in the plane spanned by x and y) such that y = Tx, and so (x,y)/(||x|| ||y||) is the cosine of the angle corresponding to T.”

Comment by Brendan Murphy | April 29, 2009 | Reply

6. Brendan, that’s a good observation about $\mathrm{SO}_2(\mathbb{R})$, but since I haven’t yet defined the group…

Comment by | April 29, 2009 | Reply

7. [...] be orthonormal, we get a real inner product on complex numbers, which in turn gives us lengths and angles. In fact, this notion of length is exactly that which we used to define the absolute value of a [...]

Pingback by | May 26, 2009 | Reply

8. [...] geometrically. We use the inner product to define a notion of (squared-)length and a notion of (the cosine of) angle . So let’s transform the space by and see what happens to our inner product, and thus to [...]

Pingback by | July 27, 2009 | Reply

9. [...] First of all, we’re going to assume our space comes with a positive-definite inner product, but it doesn’t really matter which one. We’re choosing a positive-definite form with signature instead of a form with some negative-definite or even degenerate portion — where we’d get s or s along the diagonal in an orthonormal basis — because we want every direction to behave the same as every other direction. More general signatures will come up when we talk about more general spaces. But we do want to be able to talk in terms of lengths and angles. [...]

Pingback by | September 22, 2009 | Reply

10. [...] Thus we also find that . And we can interpret this inner product in terms of the length of and the angle between and [...]

Pingback by | October 5, 2009 | Reply

11. [...] ) times the sine of the angle between the two vectors. To calculate this angle we again use the inner product to find that its cosine is , and so its sine is . Multiplying these all together we find a height [...]

Pingback by | November 5, 2009 | Reply

12. [...] do we mean by “perpendicular”? It’s not just in terms of the “angle” defined by the inner product. Indeed, in that sense the parallelograms and are perpendicular. No, we want [...]

Pingback by | November 9, 2009 | Reply

13. [...] know a lot about the relation between the inner product and the lengths of vectors and the angle between them. Specifically, we can [...]

Pingback by | January 28, 2010 | Reply

14. [...] inner product gives us a notion of length and angle. Invariance now tells us that these notions are unaffected by the action of . That is, the vectors [...]

Pingback by | September 27, 2010 | Reply

15. [...] us measure things. Specifically, since is an inner product it gives us notions of the length and angle for tangent vectors at . We must be careful here; we do not yet have a way of measuring distances [...]

Pingback by | September 20, 2011 | Reply

« Previous | Next »

## About this weblog

This is mainly an expository blath, with occasional high-level excursions, humorous observations, rants, and musings. The main-line exposition should be accessible to the “Generally Interested Lay Audience”, as long as you trace the links back towards the basics. Check the sidebar for specific topics (under “Categories”).

I’m in the process of tweaking some aspects of the site to make it easier to refer back to older topics, so try to make the best of it for now.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 23, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9222147464752197, "perplexity_flag": "head"}