ProjectionMatrix - Maple Help

Student[LinearAlgebra]

 ProjectionMatrix
 construct the matrix of the orthogonal projection onto a subspace

 Calling Sequence ProjectionMatrix(S, options)

Parameters

 S - {set, list}(Vector); Vectors spanning the subspace to project onto 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·{\left({M}^{\mathrm{Typesetting}:-\mathrm{_Hold}\left(\left[\mathrm{%T}\right]\right)}·M\right)}^{\mathrm{-1}}·{M}^{\mathrm{Typesetting}:-\mathrm{_Hold}\left(\left[\mathrm{%T}\right]\right)}$

 • Additional arguments are passed as options to the Matrix constructor which builds the result.

Examples

 > $\mathrm{with}\left({\mathrm{Student}}_{\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≔\mathrm{.}\left(P,v\right)$
 ${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)
 > $\mathrm{.}\left(w,v-w\right)$
 ${0}$ (6)
 > $\mathrm{ProjectionMatrix}\left(\left\{⟨a,1⟩\right\}\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]$ (7)

Compatibility

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