GAP: construct projection operator onto subspace

106 Views Asked by At

In GAP, I would like to check if a vector $v$ has a non-vanishing overlap with a given subspace $U$.

Consider a linear subspace $U \subset V$ and its complement $U^\perp$ with respect to a non-degenerate inner product. Thus one has $U + U^\perp = V$. Given a vector $v \in V$, one can then always write it as $v = v_U + v_{U^\perp}$ with $v_U \in U$ and $v_{U^\perp} \in U^\perp$. Using GAP, I would like to determine if $v_{U} \neq 0$. (For my case, I mostly care about $V=\mathbb{R}^n$ with the euclidean inner product or $V=\mathbb{C}$ with the hermitian inner product.)

This is the case if $v^T \Pi_U v > 0$ holds, where $\Pi_U$ is the orthogonal projection operator onto the subspace $U$ and $v^T$ the transpose of $v$. However, I could not find a method in the documentation with which this projection operator is easily constructed.

Have I overlooked something; are there easier ways to check if a vector has "support" on some given subspace?

1

There are 1 best solutions below

0
On

This answers the question of how to determine if a vector has support on a given subspace $U$. It does not answer how to construct an orthogonal projection operator onto $U$.

The simple answer is that is suffices to know a basis that spans $U$. In particular, the basis is not required to be orthonormal.

Let $\{a_i\}_{i=1}^K$ be such (non-orthonormalized) basis. The following operator is positive definite and has support on the whole of $U$

$$M_U = \sum_i^K a_i a_i^T\,.$$

(for complex vector spaces, replace the transpose $a_i^T$ by the complex conjugate transpose $a_i^\dagger$).

It is straightforward to see (diagonalize $M$) that $v$ has support on subspace $U$ if and only if

$$v^T M_U v > 0\,.$$