Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Determine whether two lists of vectors span the same subspace
ResourceFunction["SameSpanQ"][list1,list2] tests whether the span of the first list of vectors is equal to the span of the second list of vectors. | |
ResourceFunction["SameSpanQ"][list1,list2,var] performs the same test for lists of functions of var. |
Test whether two lists of vectors in span the same subspace:
In[1]:= |
Out[1]= |
Test vectors in :
In[2]:= |
Out[4]= |
Since there are six vectors in the first list and only three in the second list, the vectors in the first list must be dependent. Check by computing the rank of the matrix:
In[5]:= |
Out[5]= |
Check that the vectors in the first list are in the span of the vectors in the second list:
In[6]:= |
Out[6]= |
Check that the vectors in the second list are in the span of the vectors in the first list:
In[7]:= |
Out[7]= |
The standard basis for the space of 2×4 matrices is:
In[8]:= |
Out[8]= |
Test whether the following list of eight vectors spans the same subspace as basis:
In[9]:= |
In[10]:= |
Out[10]= |
The eighth matrix in the list is a linear combination of the second and seventh vectors:
In[11]:= |
Out[11]= |
Check:
In[12]:= |
Out[12]= |
Two lists of polynomials that determine the same subspace:
In[13]:= |
Out[13]= |
The Legendre polynomials of degree at most n span the same subspace as the space of polynomials of degree at most n:
In[14]:= |
Out[14]= |
Two lists of trigonometric functions that span the same subspace:
In[15]:= |
Out[16]= |
Two lists of exponential, trigonometric and hyperbolic functions that span the same subspace:
In[17]:= |
Out[17]= |
This work is licensed under a Creative Commons Attribution 4.0 International License