Function Repository Resource:

# LinearlyIndependent (2.1.0)current version: 3.0.0 »

Determine whether a set of vectors is linearly independent

Contributed by: Wolfram|Alpha Math Team
 ResourceFunction["LinearlyIndependent"][{vect1,vect2,…}] returns the conditions under which the given vectors are mutually linearly independent.

## Details

For numeric input, ResourceFunction["LinearlyIndependent"] will return True or False. For symbolic input, the result may be a ConditionalExpression.

## Examples

### Basic Examples (4)

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]=

### Scope (3)

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]=

### Properties and Relations (6)

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]=

## Publisher

Wolfram|Alpha Math Team

## Version History

• 3.0.0 – 23 March 2023
• 2.1.0 – 11 May 2021
• 2.0.0 – 24 January 2020
• 1.0.0 – 03 October 2019