# Projection

Projection[u,v]

finds the projection of the vector u onto the vector v.

Projection[u,v,f]

finds projections with respect to the inner product function f.

# Details • For ordinary real vectors u and v, the projection is taken to be .
• For ordinary complex vectors u and v, the projection is taken to be , where is Conjugate[v].
• In Projection[u,v,f], u and v can be any expressions or lists of expressions for which the inner product function f applied to pairs yields real results. »
• Projection[u,v,Dot] effectively assumes that all elements of u and v are real. »

# Examples

open allclose all

## Basic Examples(2)

Project the vector (5, 6, 7) onto the axis:

Project onto another vector:

## Scope(9)

Find the projection of a machine-precision vector onto another:

Projection of a complex vector onto another:

Projection of an exact vector onto another:

Projection of an arbitrary-precision vector onto another:

The projection of large numerical vectors is computed efficiently:

Project symbolic vectors:

Give an inner product of Dot to assume all expressions are real-valued:

Project vectors that are not lists using an explicit inner product:

Specify the inner product using a pure function:

## Applications(2)

Find parallel and orthogonal components of a vector:

u is the sum of the parallel and orthogonal components:

Unnormalized GramSchmidt algorithm (use Orthogonalize for a better implementation):

Do GramSchmidt on a random set of 3 vectors:

Verify orthogonality:

Generate some orthogonal polynomials:

## Properties & Relations(3)

The projection of u onto v is in the direction of v:

For ordinary vectors u and v, the projection is taken to be :

The projection of u onto v is equivalent to multiplication by an outer product matrix: