Porisma
Back to reading

Vectors: magnitude, direction and products

Compare parallel and perpendicular lengths · Diagrams

Dot and cross products as right-triangle lengths

Compare parallel and perpendicular lengths using a unit target direction. Both lengths are nonnegative, even when the scalar component is negative.

Illustration: |a| = 3 units and b̂ points right. Change θ to compare signs and lengths. Values are rounded to four significant figures.

Angle θ between a and b45°
Try an example
PQRθb̂

Acute angle

The projection follows the target direction; its signed component is positive.

Signed scalar s
2.121
Parallel length PQ
2.121 units
Perpendicular length QR
2.121 units

PR represents a, PQ its parallel vector and QR its perpendicular residual. The angle θ is measured from b̂ to a.

The cross-product vector is normal to this plane. Its magnitude equals QR; it is a different vector from the in-plane residual.

Keep the scalar component's sign

s=a⋅b^s=\mathbf a\cdot\widehat{\mathbf b}

Use the unit direction b^=b/∣b∣\widehat{\mathbf b}=\mathbf b/|\mathbf b|, with b≠0\mathbf b\ne\mathbf0. A negative component means the projection points opposite to this direction.

Take a magnitude for the parallel length

d=PQ=∣a⋅b^∣d=PQ=|\mathbf a\cdot\widehat{\mathbf b}|

PQ is a nonnegative length. The same absolute-value formula covers acute and obtuse angles.

Read the cross-product magnitude as a height

h=QR=∣a×b^∣h=QR=|\mathbf a\times\widehat{\mathbf b}|

The cross-product vector is normal to the plane. Its magnitude equals QR; it is a different vector from the in-plane perpendicular residual.

Check the two lengths together

d2+h2=∣a∣2d^2+h^2=|\mathbf a|^2

The parallel and perpendicular components form the two legs. At a parallel boundary the height is zero, and at a right angle the parallel component is zero.

The target vector b must be nonzero to form b̂. If a is zero, both lengths are zero and its angle has no defined direction.

Compare with the source length construction

Expand diagram

Use the scrollbars or arrow keys to inspect details.

Acute right triangle PQR: directed PR is a, b points right parallel to PQ, Q is the perpendicular foot and theta is at P. A horizontal dimension gives PQ=|a dot b-hat| and a vertical dimension gives QR=|a cross b-hat|. Dashed guides and a right-angle square mark the projection. These are scalar lengths, not cross-product vector directions.
Acute right triangle PQR: directed PR is a, b points right parallel to PQ, Q is the perpendicular foot and theta is at P. A horizontal dimension gives PQ=|a dot b-hat| and a vertical dimension gives QR=|a cross b-hat|. Dashed guides and a right-angle square mark the projection. These are scalar lengths, not cross-product vector directions.
Acute right triangle PQR: directed PR is a, b points right parallel to PQ, Q is the perpendicular foot and theta is at P. A horizontal dimension gives PQ=|a dot b-hat| and a vertical dimension gives QR=|a cross b-hat|. Dashed guides and a right-angle square mark the projection. These are scalar lengths, not cross-product vector directions.
Open original diagram (new tab)
Back to reading