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?
NullspaceMat,TriangulizedMatandRankMatwill make such functionality easy to build. – ahulpke Oct 09 '19 at 15:50