Orthogonal Vectors and Subspaces

April 13, 2026

Problem

Verify that u = [1, 2, −1] and v = [3, 0, 3] are orthogonal by computing u · v. Show the right angle geometrically.

Explanation

Orthogonality from the dot product

Two vectors u,vRn\mathbf{u}, \mathbf{v} \in \mathbb{R}^n are orthogonal (written uv\mathbf{u} \perp \mathbf{v}) if their dot product is zero: uv=u1v1+u2v2++unvn=0\mathbf{u} \cdot \mathbf{v} = u_1 v_1 + u_2 v_2 + \cdots + u_n v_n = 0

This is equivalent to the geometric statement "the angle between them is 90°90°" — because uv=uvcosθ\mathbf{u} \cdot \mathbf{v} = \|\mathbf{u}\| \, \|\mathbf{v}\| \, \cos \theta

and cos90°=0\cos 90° = 0.

Step-by-step

u=(1,2,1),v=(3,0,3)\mathbf{u} = (1, 2, -1), \quad \mathbf{v} = (3, 0, 3).

Step 1 — Compute the dot product. uv=(1)(3)+(2)(0)+(1)(3)\mathbf{u} \cdot \mathbf{v} = (1)(3) + (2)(0) + (-1)(3)

Step 2 — Evaluate. uv=3+03=0\mathbf{u} \cdot \mathbf{v} = 3 + 0 - 3 = \boxed{0}

So uv\mathbf{u} \perp \mathbf{v}

Angle: cosθ=0/(uv)=0\cos \theta = 0 / (\|\mathbf{u}\| \|\mathbf{v}\|) = 0, so θ=90°\theta = 90°.

Norms and normalization

The norm (length) of a vector is u=uu\|\mathbf{u}\| = \sqrt{\mathbf{u} \cdot \mathbf{u}}.

For our u\mathbf{u}: u=1+4+1=6\|\mathbf{u}\| = \sqrt{1 + 4 + 1} = \sqrt{6}. For v\mathbf{v}: v=9+0+9=18=32\|\mathbf{v}\| = \sqrt{9 + 0 + 9} = \sqrt{18} = 3\sqrt{2}.

A unit vector u^=u/u\hat{\mathbf{u}} = \mathbf{u}/\|\mathbf{u}\| has norm 1. Two unit vectors are orthonormal iff they are orthogonal.

Properties of the dot product

  • Commutative: uv=vu\mathbf{u} \cdot \mathbf{v} = \mathbf{v} \cdot \mathbf{u}.
  • Distributive: u(v+w)=uv+uw\mathbf{u} \cdot (\mathbf{v} + \mathbf{w}) = \mathbf{u} \cdot \mathbf{v} + \mathbf{u} \cdot \mathbf{w}.
  • Scalar: (cu)v=c(uv)(c \mathbf{u}) \cdot \mathbf{v} = c (\mathbf{u} \cdot \mathbf{v}).
  • Positive-definite: uu0\mathbf{u} \cdot \mathbf{u} \ge 0, with equality iff u=0\mathbf{u} = \mathbf{0}.

Orthogonal subspaces

Two subspaces U,WU, W are orthogonal if every vector in UU is orthogonal to every vector in WW. They need not span the whole space; they just can't share any direction.

The orthogonal complement of UU, written UU^\perp, is the set of all vectors orthogonal to every vector in UU. It satisfies: dimU+dimU=dim(ambient space)\dim U + \dim U^\perp = \dim (\text{ambient space})

Important identities for any m×nm \times n matrix AA:

  • Row(A)=Null(A)\operatorname{Row}(A)^\perp = \operatorname{Null}(A)
  • Col(A)=Null(AT)\operatorname{Col}(A)^\perp = \operatorname{Null}(A^T)

These are the four fundamental subspaces.

Why orthogonality matters

  • Pythagorean theorem: uv    u+v2=u2+v2\mathbf{u} \perp \mathbf{v} \implies \|\mathbf{u} + \mathbf{v}\|^2 = \|\mathbf{u}\|^2 + \|\mathbf{v}\|^2.
  • Projection: projecting onto a subspace uses orthogonal decomposition.
  • Gram-Schmidt: builds an orthogonal basis from any set of linearly independent vectors.
  • Fourier analysis: the sines and cosines {1,cosnx,sinnx}\{1, \cos nx, \sin nx\} are mutually orthogonal under the integral inner product.

Common mistakes

  • Calling vectors orthogonal when one is zero. By convention, 0\mathbf{0} is orthogonal to every vector (dot product is zero).
  • Confusing orthogonality with parallelism. Orthogonal: dot product 0. Parallel: cross product 0 (in R3\mathbb{R}^3) or vectors are scalar multiples.
  • Forgetting to square-root the norm. u2=uu\|\mathbf{u}\|^2 = \mathbf{u} \cdot \mathbf{u}; the length itself takes a square root.

Try it in the visualization

Drag two vectors in 3D. The angle display updates; the two vectors are colored to show orthogonality (green) vs. acute/obtuse angles (yellow/red). A small right-angle square appears at the origin when the dot product is zero.

Interactive Visualization

Parameters

1.00
2.00
-1.00
3.00
0.00
3.00
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Orthogonal Vectors and Subspaces | MathSpin