ProjectionMatrix - Maple Help

LinearAlgebra

 ProjectionMatrix
 construct the matrix of the orthogonal projection onto a subspace

 Calling Sequence ProjectionMatrix(S, conj, options)

Parameters

 S - {set, list}(Vector); Vectors spanning the subspace to project onto conj - BooleanOpt(conjugate); (optional) specifies if the Hermitian transpose is used (default: true) options - (optional); constructor options for the result object

Description

 • The ProjectionMatrix(S) command constructs the matrix of the orthogonal linear projection onto the subspace spanned by the vectors in S.  If $B$ is a maximal, linearly independent subset of $S$ and $M$ is the Matrix whose columns are the Vectors in $B$, then

$\mathrm{ProjectionMatrix}\left(S\right)=M\cdot {\left({M}^{*}\cdot M\right)}^{-1}\cdot {M}^{*}$

 • If the conj option is omitted or provided in either of the forms conjugate or conjugate=true, the projection matrix is constructed using Hermitian transpose operations.  If the conj option is given as conjugate=false, the ordinary transpose is used.
 • Additional arguments are passed as options to the Matrix constructor which builds the result.

Examples

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $S≔\left[⟨1,2,3,4⟩,⟨4,3,2,1⟩\right]$
 ${S}{≔}\left[\left[\begin{array}{c}{1}\\ {2}\\ {3}\\ {4}\end{array}\right]{,}\left[\begin{array}{c}{4}\\ {3}\\ {2}\\ {1}\end{array}\right]\right]$ (1)
 > $P≔\mathrm{ProjectionMatrix}\left(S\right)$
 ${P}{≔}\left[\begin{array}{cccc}\frac{{7}}{{10}}& \frac{{2}}{{5}}& \frac{{1}}{{10}}& {-}\frac{{1}}{{5}}\\ \frac{{2}}{{5}}& \frac{{3}}{{10}}& \frac{{1}}{{5}}& \frac{{1}}{{10}}\\ \frac{{1}}{{10}}& \frac{{1}}{{5}}& \frac{{3}}{{10}}& \frac{{2}}{{5}}\\ {-}\frac{{1}}{{5}}& \frac{{1}}{{10}}& \frac{{2}}{{5}}& \frac{{7}}{{10}}\end{array}\right]$ (2)
 > $v≔⟨1,0,-1,3⟩$
 ${v}{≔}\left[\begin{array}{c}{1}\\ {0}\\ {-1}\\ {3}\end{array}\right]$ (3)
 > $w≔P·v$
 ${w}{≔}\left[\begin{array}{c}{0}\\ \frac{{1}}{{2}}\\ {1}\\ \frac{{3}}{{2}}\end{array}\right]$ (4)
 > $\mathrm{Basis}\left(\left[\mathrm{op}\left(S\right),w\right]\right)=S$
 $\left[\left[\begin{array}{c}{1}\\ {2}\\ {3}\\ {4}\end{array}\right]{,}\left[\begin{array}{c}{4}\\ {3}\\ {2}\\ {1}\end{array}\right]\right]{=}\left[\left[\begin{array}{c}{1}\\ {2}\\ {3}\\ {4}\end{array}\right]{,}\left[\begin{array}{c}{4}\\ {3}\\ {2}\\ {1}\end{array}\right]\right]$ (5)
 > $w·\left(v-w\right)$
 ${0}$ (6)
 > $P≔\mathrm{ProjectionMatrix}\left(\left\{⟨1,2,3⟩,⟨4,5,6⟩\right\},\mathrm{datatype}=\mathrm{float}\left[8\right],\mathrm{shape}=\mathrm{symmetric}\right)$
 ${P}{≔}\left[\begin{array}{ccc}{0.833333333333333}& {0.333333333333333}& {-0.166666666666667}\\ {0.333333333333333}& {0.333333333333333}& {0.333333333333333}\\ {-0.166666666666667}& {0.333333333333333}& {0.833333333333333}\end{array}\right]$ (7)
 > $P·⟨1,0,0⟩$
 $\left[\begin{array}{c}{0.833333333333333}\\ {0.333333333333333}\\ {-0.166666666666667}\end{array}\right]$ (8)
 > $\mathrm{ProjectionMatrix}\left(\left\{⟨a,1⟩\right\}\right)$
 $\left[\begin{array}{cc}\frac{{a}{}\stackrel{{&conjugate0;}}{{a}}}{\stackrel{{&conjugate0;}}{{a}}{}{a}{+}{1}}& \frac{{a}}{\stackrel{{&conjugate0;}}{{a}}{}{a}{+}{1}}\\ \frac{\stackrel{{&conjugate0;}}{{a}}}{\stackrel{{&conjugate0;}}{{a}}{}{a}{+}{1}}& \frac{{1}}{\stackrel{{&conjugate0;}}{{a}}{}{a}{+}{1}}\end{array}\right]$ (9)
 > $\mathrm{ProjectionMatrix}\left(\left\{⟨a,1⟩\right\},\mathrm{conjugate}=\mathrm{false}\right)$
 $\left[\begin{array}{cc}\frac{{{a}}^{{2}}}{{{a}}^{{2}}{+}{1}}& \frac{{a}}{{{a}}^{{2}}{+}{1}}\\ \frac{{a}}{{{a}}^{{2}}{+}{1}}& \frac{{1}}{{{a}}^{{2}}{+}{1}}\end{array}\right]$ (10)

Compatibility

 • The LinearAlgebra[ProjectionMatrix] command was introduced in Maple 17.