# 方向余弦

**方向余弦**是三维空间中一条有向直线或向量与坐标轴正方向所成夹角的余弦。对于与 x、y、z 轴分别成角 \( \alpha \)、\( \beta \)、\( \gamma \) 的直线，其方向余弦为 \( \cos\alpha \)、\( \cos\beta \)、\( \cos\gamma \)，习惯上写作 \( l \)、\( m \)、\( n \)。[1] 它们等同于指向该方向的单位向量的 (x, y, z) 坐标。[2]<sup>[1](https://www.geeksforgeeks.org/maths/direction-cosines-and-direction-ratios/)</sup><sup> • </sup><sup>[2](https://mathworld.wolfram.com/DirectionCosine.html)</sup>

| 关键事实 | 详述 |
|---|---|
| 定义 | 与 x、y、z 轴正方向所成方向角 \( \alpha \)、\( \beta \)、\( \gamma \) 的余弦；记作 \( l \)、\( m \)、\( n \)[1]<sup>[1](https://www.geeksforgeeks.org/maths/direction-cosines-and-direction-ratios/)</sup> |
| 恒等式 | \( l^{2} + m^{2} + n^{2} = 1 \)，故任意两个方向角即可确定第三个[3]<sup>[3](https://www.ae.msstate.edu/vlsm/forcesys/analytic_review/direc_cos.htm)</sup> |
| 单位向量形式 | \( \hat{\mathbf{A}} = \cos\theta_{x}\,\mathbf{i} + \cos\theta_{y}\,\mathbf{j} + \cos\theta_{z}\,\mathbf{k} \)[4]<sup>[4](https://engineeringstatics.org/pdf/statics.pdf)</sup> |
| 方向比 | 任何与 \( (l, m, n) \) 成比例的三元组 \( (a, b, c) \)；一条直线有无穷多组方向比，但只有唯一的两组方向余弦三元组[1][5]<sup>[1](https://www.geeksforgeeks.org/maths/direction-cosines-and-direction-ratios/)</sup><sup> • </sup><sup>[5](https://ycmou.ac.in/wp-content/uploads/custom-assets/ebooks/CHE516%20Chemical%20Mathematics%20%26%20Biostatistics.pdf)</sup> |
| 换算 | 由方向比 \( (a, b, c) \)：\( l = a/\sqrt{a^{2}+b^{2}+c^{2}} \)，\( m \) 与 \( n \) 同理[6]<sup>[6](https://www.pyqvault.com/notes/nda-maths/3d-geometry/direction-cosines-ratios)</sup> |
| 符号歧义 | 无向直线还与坐标轴成补角 \( \pi-\alpha \)、\( \pi-\beta \)、\( \pi-\gamma \)，这会使三个余弦全部变号；将直线视为有向即可消除歧义[1]<sup>[1](https://www.geeksforgeeks.org/maths/direction-cosines-and-direction-ratios/)</sup> |

## 定义与几何意义

要确定空间中一条直线的取向，需要知道它与坐标系各轴所成的角；这些角通常由解析几何和三角学求得，而非直接测量。[3] 对于过原点的有向直线，与 x、y、z 轴所成的角 \( \alpha \)、\( \beta \)、\( \gamma \) 称为方向角，其余弦即为方向余弦 \( l \)、\( m \)、\( n \)。[1] 同样的定义适用于任何非零向量：它与坐标轴所成的角即其方向角，其余弦即其方向余弦。[7]<sup>[3](https://www.ae.msstate.edu/vlsm/forcesys/analytic_review/direc_cos.htm)</sup><sup> • </sup><sup>[1](https://www.geeksforgeeks.org/maths/direction-cosines-and-direction-ratios/)</sup><sup> • </sup><sup>[7](https://openstax.org/books/calculus-volume-3/pages/2-3-the-dot-product)</sup>

由于每个方向余弦都等于单位向量在某一轴上的投影，三元组 \( (l, m, n) \) 正是沿该直线的单位向量的坐标三元组。[2] 在静力学中，这写作 \( \hat{\mathbf{A}} = \cos\theta_{x}\,\mathbf{i} + \cos\theta_{y}\,\mathbf{j} + \cos\theta_{z}\,\mathbf{k} \)，其中每个分量等于向量的相应分量除以总模长。[4]<sup>[2](https://mathworld.wolfram.com/DirectionCosine.html)</sup><sup> • </sup><sup>[4](https://engineeringstatics.org/pdf/statics.pdf)</sup>

## 单位恒等式

三个方向余弦并非相互独立。由于它们是单位向量的分量，故满足

\[ l^{2} + m^{2} + n^{2} = 1. \]

一个实用的推论是：若已知三个方向角中的任意两个，即可由该关系式算出第三个。[3] 同一恒等式在工程静力学中写作 \( \cos^{2}\theta_{x} + \cos^{2}\theta_{y} + \cos^{2}\theta_{z} = 1 \)。[4]<sup>[3](https://www.ae.msstate.edu/vlsm/forcesys/analytic_review/direc_cos.htm)</sup><sup> • </sup><sup>[4](https://engineeringstatics.org/pdf/statics.pdf)</sup>

## 方向余弦与方向比

与方向余弦成比例的数称为方向比（也称方向数）。若 \( a \)、\( b \)、\( c \) 是方向余弦为 \( l \)、\( m \)、\( n \) 的直线的方向比，则存在某个非零常数 \( \lambda \)，使得 \( a = \lambda l \)、\( b = \lambda m \)、\( c = \lambda n \)。[1][8] 由于任何非零倍数同样适用，一条直线有无穷多组方向比，但只有唯一的两组方向余弦三元组（沿直线的每个方向各一组）。[5]<sup>[1](https://www.geeksforgeeks.org/maths/direction-cosines-and-direction-ratios/)</sup><sup> • </sup><sup>[8](https://www.ncertbooks.net/textbook/pdf/lemh205.pdf)</sup><sup> • </sup><sup>[5](https://ycmou.ac.in/wp-content/uploads/custom-assets/ebooks/CHE516%20Chemical%20Mathematics%20%26%20Biostatistics.pdf)</sup>

要从方向比 \( (a, b, c) \) 还原方向余弦，只需将各分量除以模长 \( \sqrt{a^{2}+b^{2}+c^{2}} \)：[6]<sup>[6](https://www.pyqvault.com/notes/nda-maths/3d-geometry/direction-cosines-ratios)</sup>

\[ l = \frac{a}{\sqrt{a^{2}+b^{2}+c^{2}}}, \quad m = \frac{b}{\sqrt{a^{2}+b^{2}+c^{2}}}, \quad n = \frac{c}{\sqrt{a^{2}+b^{2}+c^{2}}}. \]

符号正是这两个概念在实践中的分歧所在。方向比的符号与尺度并不固定，而方向余弦一旦选定直线的方向便随之确定。无向直线与坐标轴既成 \( \alpha \)、\( \beta \)、\( \gamma \)，也成它们的补角 \( \pi-\alpha \)、\( \pi-\beta \)、\( \pi-\gamma \)，而补角那一组会使三个余弦全部变号；选定有向直线后，三元组便唯一确定。[1]<sup>[1](https://www.geeksforgeeks.org/maths/direction-cosines-and-direction-ratios/)</sup>

## 用点积计算

方向角通常用点积来计算。对于非零向量 \( \mathbf{u} \) 与 \( \mathbf{v} \)，\( \cos\theta = \frac{\mathbf{u}\cdot\mathbf{v}}{\lVert\mathbf{u}\rVert\,\lVert\mathbf{v}\rVert} \)，其中 \( \theta \) 取在 \( 0^{\circ} \le \theta \le 180^{\circ} \) 内，使反余弦唯一。[7] 取 \( \mathbf{v} \) 分别与单位向量 \( \mathbf{i} \)、\( \mathbf{j} \)、\( \mathbf{k} \) 作点积，即可直接得到三个方向余弦，因为两个单位向量的点积就是它们夹角的余弦。[9]<sup>[7](https://openstax.org/books/calculus-volume-3/pages/2-3-the-dot-product)</sup><sup> • </sup><sup>[9](https://opentext.uleth.ca/apex-calculus/sec_dot_product.html)</sup>

作为一个算例，对于 \( \mathbf{v} = \langle 2, 3, 3 \rangle \)，方向余弦为 \( \cos\alpha = 2/\sqrt{22} \)、\( \cos\beta = 3/\sqrt{22} \)、\( \cos\gamma = 3/\sqrt{22} \)，从而方向角为 \( \alpha = 1.130 \) 弧度，\( \beta = \gamma = 0.877 \) 弧度。[7]<sup>[7](https://openstax.org/books/calculus-volume-3/pages/2-3-the-dot-product)</sup>

## 应用

凡需用数值表述三维方向之处，都会出现方向余弦。在工程静力学中，当仅已知力对各轴的倾角时，可用方向余弦将力分解为笛卡尔分量。[4] 微积分教材指出它们在航天工程等实际计算中的作用：发射角必须精确确定，因为微小的角度误差就可能使火箭远远偏离航向。[7] 在坐标变换中，两组坐标轴通过九个方向余弦 \( a_{11}, a_{12}, \ldots, a_{33} \) 相互关联，用以刻画一个坐标系与另一个坐标系的关系，这一表述被用来定义张量并描述物理性质在不同坐标系之间的变换方式。[10]<sup>[4](https://engineeringstatics.org/pdf/statics.pdf)</sup><sup> • </sup><sup>[7](https://openstax.org/books/calculus-volume-3/pages/2-3-the-dot-product)</sup><sup> • </sup><sup>[10](https://xray.cz/kryst/fyzikalni_krystalografie_b.pdf)</sup>

## References

1. [Direction Cosines and Direction Ratios, GeeksforGeeks](https://www.geeksforgeeks.org/maths/direction-cosines-and-direction-ratios/)
2. [Direction Cosine, Wolfram MathWorld](https://mathworld.wolfram.com/DirectionCosine.html)
3. [Review of Analytic Geometry: Direction Cosines of a Line, Mississippi State University](https://www.ae.msstate.edu/vlsm/forcesys/analytic_review/direc_cos.htm)
4. [Engineering Statics, Chapter 2: Forces and Other Vectors](https://engineeringstatics.org/pdf/statics.pdf)
5. [Chemical Mathematics & Biostatistics, Yashwantrao Chavan Maharashtra Open University](https://ycmou.ac.in/wp-content/uploads/custom-assets/ebooks/CHE516%20Chemical%20Mathematics%20%26%20Biostatistics.pdf)
6. [Direction Cosines & Direction Ratios, NDA Maths 3D Geometry Notes, PyqVault](https://www.pyqvault.com/notes/nda-maths/3d-geometry/direction-cosines-ratios)
7. [2.3 The Dot Product, Calculus Volume 3, OpenStax](https://openstax.org/books/calculus-volume-3/pages/2-3-the-dot-product)
8. [Three-Dimensional Geometry, NCERT Mathematics textbook PDF](https://www.ncertbooks.net/textbook/pdf/lemh205.pdf)
9. [The Dot Product, APEX Calculus, University of Lethbridge](https://opentext.uleth.ca/apex-calculus/sec_dot_product.html)
10. [Transformations, physical crystallography course notes](https://xray.cz/kryst/fyzikalni_krystalografie_b.pdf)

---
*Initially written Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 几何学与拓扑学 › Analytic and coordinate geometry

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/direction-cosines

English original: https://www.edgepedia.org/direction-cosines
