对于一个向量 $\mathbf{v}=(v_1,v_2,\ldots,v_n)$,它的单位向量 $\mathbf{u}$ 可以通过以下步骤计算得到:
1. 计算向量 $\mathbf{v}$ 的模长 $|\mathbf{v}|$,即:$$|\mathbf{v}|=\sqrt{v_1^2+v_2^2+\cdots+v_n^2}$$
2. 将向量 $\mathbf{v}$ 中每个分量除以模长 $|\mathbf{v}|$,即:$$\mathbf{u}=\left(\frac{v_1}{|\mathbf{v}|},\frac{v_2}{|\mathbf{v}|},\ldots,\frac{v_n}{|\mathbf{v}|}\right)$$
得到的 $\mathbf{u}$ 就是向量 $\mathbf{v}$ 的单位向量。
例如,对于向量 $\mathbf{v}=(2,-3,1)$,它的模长为 $|\mathbf{v}|=\sqrt{2^2+(-3)^2+1^2}=3.742$。因此,它的单位向量为:$$\mathbf{u}=\left(\frac{2}{3.742},\frac{-3}{3.742},\frac{1}{3.742}\right)\approx(0.534,-0.802,0.267)$$
Copyright © 2025 IZhiDa.com All Rights Reserved.
知答 版权所有 粤ICP备2023042255号