Intermediate

向量夾角計算機

輸入兩個等長向量的分量,以度數和弧度求得它們之間的夾角。
Comma or space separated
Must have the same length as a
Angle between vectors
45°

Computed from the dot product formula

abVector directions (first two components) — angle between them
Angle (radians)
0.7854
cos θ
0.7071
Dot product a·b
1
Magnitude |a|
1
Magnitude |b|
1.4142
Step by step
  1. 1

    Dot product a·b

    1×1 + 0×1 + 0×0 = 1
  2. 2

    Magnitude |a|

    √(1² + 0² + 0²) = 1
  3. 3

    Magnitude |b|

    √(1² + 1² + 0²) = 1.4142
  4. 4

    cos θ = a·b ÷ (|a| × |b|)

    1 ÷ (1 × 1.4142) = 0.7071
  5. 5

    Angle θ = arccos(cos θ) × 180 ÷ π

    arccos(0.7071) × 180 ÷ π = 45
計算結果僅為一般資訊用途的估算值,並非專業建議——在仰賴重要結果之前,請務必自行獨立查證。 閱讀完整免責聲明.
快速解答

此計算機如何運作?

要求兩個向量之間的夾角,取其點積除以兩者模長之積得 cos θ,再取反餘弦。結果在 0° 到 180° 之間,可告知向量是同向(0°)、垂直(90°)還是反向(180°)。

公式
cos θ = (a·b) / (|a| × |b|), θ = arccos(cos θ)
How this is calculated

以逗號或空格分隔的數字分量列表輸入向量 a 和 b。兩個向量的分量數必須相同(維度相同),且均不能為零向量,因為當模長為零時,夾角無法定義。

計算機首先計算點積 a·b = Σ aᵢbᵢ 以及模長 |a| = √(Σ aᵢ²) 和 |b| = √(Σ bᵢ²)。夾角的餘弦值為 cos θ = (a·b) / (|a| × |b|)。此值在數學上位於 [-1, 1] 範圍內,但浮點數捨入可能使其略微超出此範圍,因此在取反餘弦之前會將其夾限到 [-1, 1]。

最後 θ = arccos(cos θ) 給出弧度角,再用 θ° = θ × 180 / π 轉換為度數。結果始終在 0° 到 180° 之間:0° 表示向量方向相同,90° 表示垂直(正交),180° 表示方向相反。

常見問題

點積僅對維度相同的向量有定義,因此兩個向量必須具有相同數量的分量。若維度不同,計算機無法計算夾角。

反餘弦函數的返回值範圍為 0 到 π 弧度(0° 到 180°)。這表示兩個向量之間最小的非方向性夾角,與它們在空間中的方向無關。

90° 的夾角表示點積為零,因此向量彼此正交(垂直)。

也稱為

向量夾角
兩向量夾角
向量角度
點積夾角
夾角計算
向量間角度
theta夾角
向量夾角公式

APA

TG we-Calculate Editorial Team. (2026). 向量夾角計算機 [Online calculator]. TG we-Calculate. https://we-calculate.com/zh-tw/calculator/angle-between-vectors-calculator

Chicago

TG we-Calculate Editorial Team. "向量夾角計算機." TG we-Calculate. 2026. https://we-calculate.com/zh-tw/calculator/angle-between-vectors-calculator.

IEEE

TG we-Calculate Editorial Team, "向量夾角計算機," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/zh-tw/calculator/angle-between-vectors-calculator

BibTeX

@misc{wecalculate_angle_between_vectors_calculator, title = {向量夾角計算機}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/zh-tw/calculator/angle-between-vectors-calculator}}, year = {2026}, note = {TG we-Calculate} }

這個計算機對您有幫助嗎?