Why can't an inner product give $ \vec u \cdot \vec v = \|\vec u\|\|\vec v\|\cos(\theta/5) $ Starting from the usual inner product axioms,

*

*Linear: $(a\vec u + b\vec v)\cdot \vec w = (a\vec u \cdot \vec w) + (b \vec v \cdot \vec w)$

*Symmetric: $\vec u \cdot \vec v = \vec v \cdot \vec u$

*Positive definite: $\vec u \cdot \vec u \geq 0$ and is equal to zero when $\vec u = \vec 0$
Due to the Cauchy-Schwartz inequality, we know that
$$ -1 \leq \frac{\vec u \cdot \vec v}{\|\vec u\|\|\vec v\|} \leq 1$$
so it is safe define the angle $\theta$ between $\vec u$ and $\vec v$ using
$$ \theta := \cos^{-1} \left(\frac{\vec u \cdot \vec v}{\|\vec u\|\|\vec v\|} \right)$$
The inner product axioms (via the Cauchy-Schwartz inequality) guarantee this to be well-defined because the argument to $\cos^{-1}$ is between -1 and 1.
But why couldn't we say something like:
$$ \theta := 5\cos^{-1} \left(\frac{\vec u \cdot \vec v}{\|\vec u\|\|\vec v\|} \right)$$
As far as I can see, this doesn't violate any of the inner product axioms, but it breaks the link between our intuition of vectors as "oriented lengths".
Is there an ironclad reason (other than not wishing to go against geometric intuition) that the angle between vectors must be defined as $\cos^{-1} (\vec u \cdot \vec v\ /\ \|\vec u\|\|\vec v\|)$? Or, is it instead the case that there is no unique definition of the angle?
 A: The reason why the formula for angle is the way it is happens to be due to the law of cosines. For any two independent vectors, say $u$ and $v$, you can represent the subspace formed by their span as a plane with coordates $[x,y]=xu + yv$ . So you can form a triangle in the coordinate representation for this plane. You can connect the end points with a third vector, the difference between the two $u-v$. Then from the law of cosines,
$|u-v|^2 = |u|^2 + |v|^2 - 2|u||v| \cos(\theta) $
The left hand side is
$|u-v|^2 = <u-v,u-v> = |u|^2 - 2<u,v> + |v|^2 $
So you can cancel the common terms with the right hand side to find
$-2<u,v> = -2|u||v|\cos(\theta) $
Then $\cos(\theta) = \frac{<u,v>}{|u||v|}$.
Essentially, the "angle" between two vectors regardless of what your definition of vectors are or what your inner product is comes down to planar trig in the coordinate space spanned by them. The reason this works is because the inner product in terms of coordinates becomes the dot product after finding an orthonormal basis to the for the coordinate space.
A: Let me give you a simple reason why we define the angle between the vectors $u$ and $v$ as $\theta = \cos^{-1} \left(\frac{u \cdot v }{\lVert u \rVert \lVert v \rVert}\right)$.
When we have defined an inner product in a vector space, we also have a notion of orthogonality: we say that $u$ and $v$ are orthogonal iff $\langle u,v\rangle =0$.
Substituting this in the formula for $\theta$, we get that the angle between orthogonal points $u$ and $v$ is $\pi/2$, so this really looks like a generalization of orthogonality.
A: Resume:

*

*The notion of angle arrives only when you have a geometric concept.


The function $\cos(x)$ came from geometry, but its concept was extended and the cosine of a complex number doesn't make any geometric sense, at least for me
$$\cos (i) = \cos \left(\sqrt{-1}\right) = \cosh 1 = \dfrac{e + \frac{1}{e}}{2} \approx 1.54 $$



*The concept of inner product arrives only when you define it, and you can have it without geometry.


You can define the inner product of two vectors (which have geometric sense):
$$\langle \vec{u}, \ \vec{v}\rangle = \sum_{i} u_i \cdot v_i$$
But you can also define the inner product of two functions $f$ and $g$ (which don't have a geometric sense)
$$\langle f, \ g\rangle = \int_{-1}^{1} f \cdot g \ dx$$

If you get something like that
$$\langle \vec{u}, \ \vec{u}\rangle = \|\vec{u}\|\|\vec{u}\| \cdot \cos \theta \label{1}\tag{1}$$
It's implicit that it's about a geometric problem, cause of the similarity with the law of cosines.
But if you want to generalize the law of cosines, it's up to you to say what $\cos \theta$ means:
$$\cos \theta = \dfrac{\langle u, \ v \rangle}{\sqrt{\langle u, \ u\rangle} \cdot \sqrt{\langle v, \ v \rangle}}$$
So, in $\mathbb{R}^{2}$ and $\mathbb{R}^{3}$, $\theta$ is indeed an angle, but for $\mathbb{R}^{n}$ the concept of geometry (the euclidean geometry's sense) is vague, which implies that the concept of an angle in $\mathbb{R}^{n}$ is also vague. What comes from the equations are mathematical generalizations.
The notion of an angle:

An angle, using Euclidean geometry, is the aperture between two rays $l_1$ and $l_2$. The way to translate this aperture from geometry to algebra is by giving this angle a value $\theta$. The way we measure it depends on the definition, for example:

*

*Using radians

*

*$l_2 \equiv l_1 \Rightarrow \theta = 0$

*$l_2 \perp l_2 \Rightarrow \theta = \dfrac{\pi}{2}$



*Using degrees

*

*$l_2 \equiv l_1 \Rightarrow \theta = 0$

*$l_2 \perp l_2 \Rightarrow \theta = 90$
In the same way that we translated the aperture to a numeric value, many things from geometry were transformed into algebra. For example, the function $\cos(\alpha)$ was created to relate the ratio of a segment's projection into a line:
$$\cos \alpha = \dfrac{b}{h}$$

Rhetorical question 1: If $b$ is always positive, why does the function $\cos (\alpha)$ gives negative values?
Rhetorical question 2: For complex numbers, why does $\cos \left(\sqrt{-1}\right) > 1$?

Coordinate system:

To treat geometry in a more algebraic way, Analytic Geometry was created, normally to work on a euclidean space.

*

*Points ($0$ dimensional entity) are described using coordinates:
$$\vec{p} = \left(p_x, \ p_y, p_z\right)$$

*Lines ($1$ dimensional entity) are described using a point $\vec{p}_0$, a direction vector $\vec{v}$ and a scalar parameter $t$:
$$\vec{p}(t) = \left(p_{0x} + t \cdot v_{x}, \ p_{0y} + t \cdot v_{y}, \ p_{0z}  + t \cdot v_{z}\right) := \vec{p}_0 + t \cdot \vec{v}$$

*Plane ($2$ dimensional entity) are described using a point $\vec{p}_0$, two direction vector $\vec{u}$ and $\vec{v}$, and two scalar parameter $t$ and $\mu$:
$$\vec{p}(t) := \vec{p}_0 + t \cdot \vec{v} + \mu \cdot \vec{u}$$
PS: I use the notation $\vec{p}$ to explicit say that $\vec{p}$ has more than one scalar value inside.
For example, we represent a triangle $ABC$ using coordinates. The point $B$ is made by the vector $\vec{u}$ and the point $A$ is made by the vector $\vec{v}$.
$$\|\vec{u}\| = a \ \ \ \ \ \ \ \ \ \ \ \ \ \ \|\vec{v}\| = b$$

The Law of cosines from geometry
$$c^2 = a^2 + b^2 - 2ab \cdot \cos \theta\label{2}\tag{2}$$
is translated to
$$\|\vec{u}-\vec{v}\|^2 = \|\vec{u}\|^2 + \|\vec{v}\|^2 - 2\langle \vec{u}, \vec{v} \rangle \label{3}\tag{3}$$
There's a similarity between \eqref{2} and \eqref{3}, which seems to be
$$ab \cdot \cos \theta = \langle \vec{u}, \ \vec{v}\rangle$$

Perpendicular vs Orthogonal

From \eqref{3} we can relate the notion of inner product into the angle of two lines $l_1$ and $l_2$:
$$\vec{u} = (u_x, \ u_y, \ u_z)$$
$$\vec{v} = (v_x, \ v_y, \ v_z)$$
$$l_1: \left\{\left(t u_x, \ t  u_y, \ t  u_z\right) \in \mathbb{R}^{3} : t \in \mathbb{R}\right\}$$
$$l_2: \left\{\left(t v_x, \ t  v_y, \ t  v_z\right) \in \mathbb{R}^{3} : t \in \mathbb{R}\right\}$$

*

*$l_1 \equiv l_2 \Rightarrow \langle \vec{u}, \ \vec{v}\rangle = \|\vec{u}\|\cdot \|\vec{v}\|$

*$l_1 \perp l_2 \Rightarrow \langle \vec{u}, \ \vec{v}\rangle = 0$
But the inverse can also be true:

*

*$\langle \vec{u}, \ \vec{v}\rangle = \|\vec{u}\|\cdot \|\vec{v}\| \Rightarrow l_1 \equiv l_2$

*$ \langle \vec{u}, \ \vec{v}\rangle = 0 \Rightarrow l_1 \perp l_2$
Which brings the question: What comes first? Linear algebra can be thought of as a generalization of Analytic Geometry, then if I find $\langle \vec{u}, \ \vec{v} \rangle = 0$ somewhere, it seems that $\vec{u}$ and $\vec{v}$ are perpendicular even if they don't represent lines?
The idea of perpendicularity ($l_1 \perp l_2$) exists only for geometry. But in linear algebra, there is a concept of orthogonality which is the generalization of the geometric notion of perpendicularity
$$l_1 \perp l_2 \Leftrightarrow l_1 \ \text{is perpendicular to} \ l_2$$
$$\langle \vec{u}, \ \vec{v} \rangle = 0 \Leftrightarrow \vec{u} \ \text{is orthogonal to} \ \vec{v}$$
The concept of orthogonal is more powerful than perpendicular, and it doesn't apply only to vectors. Saying two things are orthogonal is not the same as saying they are perpendicular, cause perpendicular arrives only when the concept of geometry exists.
For example, saying two functions $f$ and $g$ are perpendicular is vague, but saying $f$ and $g$ are orthogonal makes sense:
$$\langle f, \ g \rangle = 0 \Leftrightarrow \int_{\Omega} f \cdot g \ d\Omega = 0$$
This concept is used for Fourier transform:
$$\langle \cos \left(m \pi x\right), \ \cos \left(n \pi x\right) \rangle = \int_{-1}^{1} \cos \left(m \pi x\right) \cos \left(n \pi x\right) \ dx = \delta_{mn} = \begin{cases} 1 \ \ \ \text{if} \ m = n \\ 0 \ \ \ \text{else}\end{cases}$$

