Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Determine whether a set of vectors is linearly independent
ResourceFunction["LinearlyIndependent"][{vect1,vect2,…}] returns the conditions under which the given vectors are mutually linearly independent. |
Test some two-dimensional vectors for linear independence:
In[1]:= |
Out[1]= |
Test some three-dimensional vectors for linear independence:
In[2]:= |
Out[2]= |
This set of vectors is linearly dependent:
In[3]:= |
Out[3]= |
Confirm that the third vector can be written as a linear combination of the first two:
In[4]:= |
Out[4]= |
LinearlyIndependent works with any number of vectors of any dimension:
In[5]:= |
Out[5]= |
For vectors with symbolic parameters, LinearlyIndependent may return a ConditionalExpression:
In[6]:= |
Out[6]= |
In[7]:= |
Out[7]= |
A True/False result may be obtained by giving values to the parameters:
In[8]:= |
Out[8]= |
In[9]:= |
Out[9]= |
LinearlyIndependent accepts vectors with complex components:
In[10]:= |
Out[10]= |
A set of vectors is linearly independent if and only if the rank of the row matrix composed of the vectors equals the length of the vectors:
In[11]:= |
Out[12]= |
In[13]:= |
Out[13]= |
A set of vectors is linearly independent if and only if the rank of the row matrix composed of the vectors has a zero-dimensional null space:
In[14]:= |
Out[15]= |
In[16]:= |
Out[16]= |
Or, alternatively:
In[17]:= |
Out[17]= |
A set of vectors is linearly independent if and only if the rank of the row matrix composed of the vectors has a nonzero determinant:
In[18]:= |
Out[19]= |
In[20]:= |
Out[20]= |
A set of vectors is linearly independent if and only if its row-reduced form has a no zeros along its diagonal:
In[21]:= |
Out[22]= |
In[23]:= |
Out[23]= |
In[24]:= |
Out[24]= |
The zero vector is linearly dependent on every other vector:
In[25]:= |
Out[25]= |
LinearlyIndependent will not evaluate if the vectors do not all have the same length:
In[26]:= |
Out[26]= |
This work is licensed under a Creative Commons Attribution 4.0 International License