シュワルツの不等式
$x,y\in \mathbb{ R }^n$とすると、$|x\cdot y|\leqq |x||y|$。
$t$に関する方程式$|tx-y|^2=0$の実数解の個数は1以下である。
つまり、$|x|^2t^2-2(x\cdot y)t+|y|^2=0$の実数解の個数は1以下。
判別式について、 \[\begin{aligned} &(x\cdot y)^2-|x|^2|y|^2\leqq 0\\ \iff&(x\cdot y)^2\leqq |x|^2|y|^2\\ \iff&|x\cdot y|\leqq |x||y|\\ \end{aligned}\]となる。
内積と余弦(cos)
2次元
$\vec{x}=(x_1,x_2)$、$\vec{y}=(y_1,y_2)$とする。
$\vec{x}=\vec{0}$または$\vec{y}=\vec{0}$ならば、$\vec{x}\cdot\vec{y}=0=|\vec{x}||\vec{y}|\cos\theta$。
$\vec{x}\neq \vec{0}$かつ$\vec{y}\neq \vec{0}$ならば、次のような実数$\theta_x$、$\theta_y$が存在する。 \begin{eqnarray} \left\{ \begin{array}{l} \cos\theta_x=\dfrac{x_1}{\sqrt{x_1^2+x_2^2}}\\ \sin\theta_x=\dfrac{x_2}{\sqrt{x_1^2+x_2^2}}\\ \cos\theta_y=\dfrac{y_1}{\sqrt{y_1^2+y_2^2}}\\ \sin\theta_y=\dfrac{y_2}{\sqrt{y_1^2+y_2^2}}\\ \end{array} \right. \end{eqnarray}
$\vec{x}=|\vec{x}|(\cos\theta_x,\sin\theta_x)$、$\vec{y}=|\vec{y}|(\cos\theta_y,\sin\theta_y)$から、 \[\vec{x}\cdot\vec{y}=|\vec{x}||\vec{y}|(\cos\theta_x\cos\theta_y+\sin\theta_x\sin\theta_y)=|\vec{x}||\vec{y}|\cos(\theta_x-\theta_y)\]
$n$次元
$x$、$y$を$n(\geqq 2)$次元のベクトルとする。
$x$、$y$を第1列、第2列とする$n$次正方行列を$P$とする。ある直交行列$U$とある上三角行列$T$に対し、$P=UT$となる。
$T$の$(i,j)$成分を$t_{ij}$とする。
平面上のベクトル$\begin{pmatrix} t_{11} \\ 0 \end{pmatrix}$と$\begin{pmatrix} t_{21}\\ t_{22} \end{pmatrix}$のなす角を$\theta$とする。
\begin{eqnarray} \left\{ \begin{array}{l} x=Pe_1=UTe_1\\ y=Pe_2=UTe_2 \end{array} \right. \end{eqnarray}
\begin{eqnarray} \left\{ \begin{array}{l} |x|=\sqrt{(UTe_1|UTe_1)}=\sqrt{(Te_1|Te_1)}=|t_{11}|\\ |y|=\sqrt{(UTe_2|UTe_2)}=\sqrt{(Te_2|Te_2)}=\sqrt{t_{12}^2+t_{22}^2} \end{array} \right. \end{eqnarray}
\begin{eqnarray} (x|y)&=&(UTe_1|UTe_2)\\ &=&(Te_1|Te_2)\\ &=&\left(\begin{pmatrix} t_{11} \\ 0\\ \vdots\\ 0 \end{pmatrix}|\begin{pmatrix} t_{12}\\ t_{22}\\ 0\\ \vdots\\ 0 \end{pmatrix}\right)\\ &=&\left(\begin{pmatrix} t_{11} \\ 0 \end{pmatrix}|\begin{pmatrix} t_{12}\\ t_{22} \end{pmatrix}\right)\\ &=&|t_{11}|\sqrt{t_{12}^2+t_{22}^2}\cos\theta\\ &=&|x||y|\cos\theta \end{eqnarray}
視覚的には、$x$、$y$は、座標軸が直交する$u_1u_2$座標平面上で、それぞれ$(t_{11},0)$、$(t_{12},t_{22})$となります。内積や角度も、平面ベクトル$(t_{11},0)$と$(t_{12},t_{22})$のものになります。