3
$\begingroup$

I am solving problems in Axler's Linear Algebra done right, and this one has me stumped. It says

Prove $\langle x, y\rangle = \lVert x\rVert\, \lVert y\rVert\cos \theta$ using the law of cosines and drawing the triangle formed by $x$, $y$, $x-y$.

Both $x$ and $y$ are coming out of origin, and we are working in $\mathbb{R}^2$. How can this hint be used to answer the proof?

  • 0
    Note that if one of $x$, $y$ is a multiple of the other, we do not get a genuine triangle, so a full proof of the result needs to deal with this situation.2011-10-05

2 Answers 2

3

The vectors $x$, $y$, and $x-y$ form a triangle with vertices at the origin, the endpoint of $x$, and the endpoint of $y$. The law of cosines says that for any triangle with sides of length $a$, $b$, and $c$, $$c^2 = a^2+b^2 - 2ab\cos(\theta),$$ where $\theta$ is the angle opposite the side $c$.

Apply the Law of cosines to the angle formed between $x$ and $y$ at the origin. The lengths of the sides that form that angle are precisely $\lVert x\rVert$ and $\lVert y\rVert$. So from the law of cosines you would have $$\lVert x-y\rVert^2 = \lVert x\rVert^2 + \lVert y\rVert^2 - 2\lVert x\rVert\,\lVert y\rVert\cos\theta.$$

Now use the fact that $$\lVert x-y\rVert^2 = \langle x-y,x-y\rangle,\quad \lVert x\rVert^2 = \langle x,x\rangle,\quad\text{and}\quad \lVert y\rVert^2 = \langle y,y\rangle.$$ Expand $\langle x-y,x-y\rangle$, and simplify.

  • 0
    Can you explain a bit more.I cant make it out how by expanding $\langle x-y,x-y\rangle$ and simplifying how you prove $\langle x,y\rangle=\lVert X\rVert\lVert y\rVert cos\theta$2011-10-05
  • 0
    @RamanaVenkata: We have $$\langle x-y,x-y\rangle = \langle x,x\rangle -\langle y,x\rangle - \langle x,y\rangle + \langle y,y\rangle = \lVert x\rVert^2 + \lVert y\rVert^2 - 2\langle x,y\rangle.$$ Substituting into $$\lVert x-y\rVert^2 = \lVert x\rVert^2 + \lVert y\rVert^2 - 2\lVert x\rVert\,\lVert y\rVert\cos\theta$$gives $$\lVert x\rVert^2 + \lVert y\rVert^2 - 2\langle x,y\rangle = \lVert x\rVert^2 + \lVert y\rVert^2 - 2\lVert x\rVert \,\lVert y\rVert \cos\theta.$$2011-10-05
  • 0
    @ Arturo Magidn: I didn't ask the question how can I accept it2011-10-05
  • 0
    @RamanaVenkata: Yes, sorry; I didn't realize that until later (should have checked).2011-10-05
  • 0
    Magidn: I forgot to use the distributive property That's the mistake I made.2011-10-05
  • 0
    @RamanaVenkata: There is no distributive property at play ("distributive property" is when one operation distributes over another, as in $a\times(b+c) = (a\times b)+(a\times c)$. What we have here is *bilinearity* of the inner product.2011-10-05
0

The law of cosines says that for a triangle with sides of length $a,b,$ and $c$, $$c^2 = a^2+b^2-2ab \cos \theta,$$ where $\theta$ is the angle opposite the side of length $c$. Rewriting this in vector notation (so $a = |x|$, $b = |y|$, and $c = |x-y|$) gives $$ |x-y|^2 = |x|^2 + |y|^2 - 2|x||y| \cos \theta. $$ Expanding the left hand side gives: $$ |x-y|^2 = \langle x-y, x-y \rangle = |x|^2-2 \langle x, y \rangle + |y|^2. $$

Subtracting $|x|^2+|y|^2$ from both sides and dividing by $-2$ then yields the result.

  • 0
    `\lVert` and `\rVert` produce $\lVert$ and $\rVert$, respectively.2011-10-05
  • 0
    Yes, I am in the habit of using the absolute value symbols to emphasize being in Euclidian space! Also, I had typically used `\|` to typeset norms. Is there a difference?2011-10-05