벡터 계산기 소개
The dot product multiplies matching components and adds them, a · b = a₁b₁ + a₂b₂ + a₃b₃. The cross product of two 3D vectors is a vector perpendicular to both, and its length equals the area of the parallelogram they span. The angle between the vectors is computed as θ = atan2(|a × b|, a · b), which equals arccos(a · b / |a||b|) but stays accurate for nearly parallel vectors, and the projection of a onto b is (a · b / |b|²) b.
Physics (work and torque), 3D graphics and linear algebra are the usual uses. The default vectors a = (1, 2, 3) and b = (4, 5, 6) give a · b = 32, a × b = (−3, 6, −3) and an angle of about 12.93°.
A dot product of 0 means the vectors are perpendicular; a zero cross product means they are parallel or one is zero. In 2D mode both vectors lie in the xy-plane, so their cross product points along z: (3, 4) × (4, −3) = (0, 0, −25).
자주 묻는 질문
How do you calculate the dot product of two vectors?
Multiply corresponding components and add the results: a · b = a₁b₁ + a₂b₂ + a₃b₃. For (1, 2, 3) · (4, 5, 6) that is 4 + 10 + 18 = 32. The dot product also equals |a||b| cos θ, so it is positive when the angle is under 90°, 0 at exactly 90° and negative beyond it: (1, 0) · (−2, 0) = −2.
How do you calculate the cross product?
For a = (a₁, a₂, a₃) and b = (b₁, b₂, b₃), a × b = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁). For (1, 2, 3) × (4, 5, 6) that gives (12 − 15, 12 − 6, 5 − 8) = (−3, 6, −3). The result is perpendicular to both vectors, follows the right-hand rule, and changes sign if the order is swapped: b × a = (3, −6, 3).
How do you find the angle between two vectors?
Use cos θ = (a · b)/(|a||b|). For (1, 2, 3) and (4, 5, 6), cos θ = 32/(√14 × √77) ≈ 0.974632, so θ ≈ 12.93°. Near 0° or 180° the arccos form loses accuracy, so the calculator uses the equivalent θ = atan2(|a × b|, a · b), the form William Kahan recommends in his notes on floating-point roundoff.
What does it mean if the dot product is zero?
The two vectors are perpendicular (orthogonal), provided neither is the zero vector. (3, 4) · (4, −3) = 12 − 12 = 0, so those vectors meet at exactly 90°. In physics the same test shows that a force at right angles to the motion does no work, since work is the dot product of force and displacement.
What is the difference between scalar and vector projection?
The scalar projection of a onto b is the signed length of a along b, a · b / |b|; the vector projection is that length times the unit vector of b, (a · b / |b|²) b. Projecting (2, 3) onto (4, 0) gives a scalar projection of 8/4 = 2 and a vector projection of (2, 0). A negative scalar projection means a points partly against b.
“벡터 계산기”의 정확도는 어느 정도인가요?
정확도는 입력값과 계산 방법의 가정에 따라 달라집니다. 십진 연산은 유효숫자 50자리를 사용하지만, 추정값·수치해석 방법·원본 데이터의 정밀도는 더 낮을 수 있습니다. 표시값을 반올림해도 이러한 한계는 사라지지 않습니다. 독립적인 출처의 풀이와 대조한 계산 예시: 5. 예를 들어 “a = (1, 2, 3), b = (4, 5, 6)”은 Hand calculation; Python decimal √14, √54 and atan2(√54, 32) in degrees (hp.py)와 대조해 확인합니다.
이 계산 방법의 출처는 무엇인가요?
Wolfram MathWorld — Dot Product; Wolfram MathWorld — Cross Product; W. Kahan, How futile are mindless assessments of roundoff in floating-point computation? §12 — angles via atan2 rather than arccos.