Checking if a matrix is contained in the span of a set of matrices Consider the set $L$ of $m \times m$ matrices. If I have an $m \times m$ matrix $A$, how could I check if $A$ can be expressed as a linear combination of the elements of $L$ if GAP returned isbasis($L$) as false?
GAP doesn't allow iscontainedinspan and other commands to be used if $L$ is not a mutable basis. Is there any other way?
In particular, I have considered GL(2,3). If $A_{i}$ is the adjacency matrix corresponding to the relation $R_{i}$ defined by $(x,y) \in R_{i} \iff yx^{-1} \in C_{i}$ and the diagonal matrix $E_{i}^{*}$ has $(x,x)$ entry of 1 of $x \in C_{i}$ and 0 otherwise, we want to compute for all possible values of $E_{i}^{*} A_{j} E_{k}^{*}$. Let the set of all such (nonzero) values be $L$. This should form the basis for $T_{0}$, whose order (130) sets the lower bound for the order of the Terwilliger algebra of GL(2,3).
The next task would be to multiply every pair of elements of $L$ to one another and determine which of these are not contained in the span of $L$. However, since GAP doesn't return isbasis($L$) as true for some reason, I cannot use iscontainedinspan or islinearcombination among others. 

I’m not entirely sure what functions you refer to —- as far as I know there is no function iscontainedinspan etc.
The easiest way to test membership is probably to unpack the matrices into row vectors. Thus, if L a list of matrices and M a matrix whose membership is to be tested, use
Ll:=List(L,Concatenation);
SolutionMat(LL,Concatenation(M));

If fail is returned, M is not in the span, if a coefficient list is returned, it is.
(If multiple tests are to be done, there are obvious ways to cache a triangulilized version of LL To improve performance.)
