Find the Distance Between Two Vectors if the Lengths and the Dot Product are Given

Linear Algebra Problems and Solutions

Problem 254

Let $\mathbf{a}$ and $\mathbf{b}$ be vectors in $\R^n$ such that their length are
\[\|\mathbf{a}\|=\|\mathbf{b}\|=1\] and the inner product
\[\mathbf{a}\cdot \mathbf{b}=\mathbf{a}^{\trans}\mathbf{b}=-\frac{1}{2}.\]

Then determine the length $\|\mathbf{a}-\mathbf{b}\|$.
(Note that this length is the distance between $\mathbf{a}$ and $\mathbf{b}$.)

 
LoadingAdd to solve later
Sponsored Links

Solution.

Recall that the length of a vector $\mathbf{x}$ is defined to be
\[\|\mathbf{x}\|=\sqrt{\mathbf{x}^{\trans}\mathbf{x}},\] where $\mathbf{x}^{\trans}$ is the transpose of $\mathbf{x}$.

Also, recall that the inner product of two vectors $\mathbf{x}, \mathbf{y}$ are commutative.
Namely we have
\[\mathbf{x}\cdot \mathbf{y}=\mathbf{x}^{\trans}\mathbf{y}=\mathbf{y}^{\trans}\mathbf{x}=\mathbf{y} \cdot \mathbf{x}.\]


Applying the second fact with given vectors $\mathbf{a}, \mathbf{b}$, we obtain
\[\mathbf{a}^{\trans}\mathbf{b}=\mathbf{b}^{\trans}\mathbf{a}= -\frac{1}{2}.\]


Now we compute $\|\mathbf{a}-\mathbf{b}\|^2$ as follows.
We have
\begin{align*}
\|\mathbf{a}-\mathbf{b}\|^2&=(\mathbf{a}-\mathbf{b})^{\trans}(\mathbf{a}-\mathbf{b}) \qquad \text{ (by definition of the length)}\\
&=(\mathbf{a}^{\trans}-\mathbf{b}^{\trans})(\mathbf{a}-\mathbf{b})\\
&=\mathbf{a}^{\trans}\mathbf{a}-\mathbf{a}^{\trans}\mathbf{b}-\mathbf{b}^{\trans}\mathbf{a}+\mathbf{b}^{\trans}\mathbf{b}\\
&=\|\mathbf{a}\|^2-\mathbf{a}^{\trans}\mathbf{b}-\mathbf{b}^{\trans}\mathbf{a}+\|\mathbf{b}\|^2\\
&=1-\left(-\frac{1}{2} \right)-\left(-\frac{1}{2} \right)+1\\
&=3.
\end{align*}

Since the length is nonnegative, we take the square root of the above equality and obtain
\[\|\mathbf{a}-\mathbf{b}\|=\sqrt{3}.\]


LoadingAdd to solve later

Sponsored Links

More from my site

  • Find the Inverse Matrix of a Matrix With FractionsFind the Inverse Matrix of a Matrix With Fractions Find the inverse matrix of the matrix \[A=\begin{bmatrix} \frac{2}{7} & \frac{3}{7} & \frac{6}{7} \\[6 pt] \frac{6}{7} &\frac{2}{7} &-\frac{3}{7} \\[6pt] -\frac{3}{7} & \frac{6}{7} & -\frac{2}{7} \end{bmatrix}.\]   Hint. You may use the augmented matrix […]
  • Inner Product, Norm, and Orthogonal VectorsInner Product, Norm, and Orthogonal Vectors Let $\mathbf{u}_1, \mathbf{u}_2, \mathbf{u}_3$ are vectors in $\R^n$. Suppose that vectors $\mathbf{u}_1$, $\mathbf{u}_2$ are orthogonal and the norm of $\mathbf{u}_2$ is $4$ and $\mathbf{u}_2^{\trans}\mathbf{u}_3=7$. Find the value of the real number $a$ in […]
  • Rotation Matrix in Space and its Determinant and EigenvaluesRotation Matrix in Space and its Determinant and Eigenvalues For a real number $0\leq \theta \leq \pi$, we define the real $3\times 3$ matrix $A$ by \[A=\begin{bmatrix} \cos\theta & -\sin\theta & 0 \\ \sin\theta &\cos\theta &0 \\ 0 & 0 & 1 \end{bmatrix}.\] (a) Find the determinant of the matrix $A$. (b) Show that $A$ is an […]
  • Construction of a Symmetric Matrix whose Inverse Matrix is ItselfConstruction of a Symmetric Matrix whose Inverse Matrix is Itself Let $\mathbf{v}$ be a nonzero vector in $\R^n$. Then the dot product $\mathbf{v}\cdot \mathbf{v}=\mathbf{v}^{\trans}\mathbf{v}\neq 0$. Set $a:=\frac{2}{\mathbf{v}^{\trans}\mathbf{v}}$ and define the $n\times n$ matrix $A$ by \[A=I-a\mathbf{v}\mathbf{v}^{\trans},\] where […]
  • Unit Vectors and Idempotent MatricesUnit Vectors and Idempotent Matrices A square matrix $A$ is called idempotent if $A^2=A$. (a) Let $\mathbf{u}$ be a vector in $\R^n$ with length $1$. Define the matrix $P$ to be $P=\mathbf{u}\mathbf{u}^{\trans}$. Prove that $P$ is an idempotent matrix. (b) Suppose that $\mathbf{u}$ and $\mathbf{v}$ be […]
  • Prove the Cauchy-Schwarz InequalityProve the Cauchy-Schwarz Inequality Let $\mathbf{a}, \mathbf{b}$ be vectors in $\R^n$. Prove the Cauchy-Schwarz inequality: \[|\mathbf{a}\cdot \mathbf{b}|\leq \|\mathbf{a}\|\,\|\mathbf{b}\|.\]   We give two proofs. Proof 1 Let $x$ be a variable and consider the length of the vector […]
  • Sum of Squares of Hermitian Matrices is Zero, then Hermitian Matrices Are All ZeroSum of Squares of Hermitian Matrices is Zero, then Hermitian Matrices Are All Zero Let $A_1, A_2, \dots, A_m$ be $n\times n$ Hermitian matrices. Show that if \[A_1^2+A_2^2+\cdots+A_m^2=\calO,\] where $\calO$ is the $n \times n$ zero matrix, then we have $A_i=\calO$ for each $i=1,2, \dots, m$.   Hint. Recall that a complex matrix $A$ is Hermitian if […]
  • Eigenvalues of a Hermitian Matrix are Real NumbersEigenvalues of a Hermitian Matrix are Real Numbers Show that eigenvalues of a Hermitian matrix $A$ are real numbers. (The Ohio State University Linear Algebra Exam Problem)   We give two proofs. These two proofs are essentially the same. The second proof is a bit simpler and concise compared to the first one. […]

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

More in Linear Algebra
Linear algebra problems and solutions
True or False. The Intersection of Bases is a Basis of the Intersection of Subspaces

Determine whether the following is true or false. If it is true, then give a proof. If it is false,...

Close