# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Determine the consistency equations required for a system of linear equations to have a solution

Contributed by:
Dennis M Schneider

ResourceFunction["LinearConstraints"][ determines the constraint equations that a vector | |

Find the constraint equations that the vector {*a*,*b*,*c*} must satisfy to be in the column space of the matrix:

In[1]:= |

Out[1]= |

When the second argument is a symbol, the second argument is replaced by a subscripted vector in that symbol:

In[2]:= |

Out[2]= |

When Subscript→False, the second argument is replaced by the array vector {b[1],b[2],b[3]}:

In[3]:= |

Out[3]= |

Setting the option PrintDisplay→True prints the matrix form of the reduced matrix that produced the constraint equations:

In[4]:= |

Out[4]= |

The print statement generates a matrix displayed in MatrixForm. To convert it to a matrix, paste a copy of the matrix into a new cell and select Cell → ConvertTo → StandardForm (Shift + Ctrl + N):

In[5]:= |

Out[5]= |

When there are no constraint equations (i.e. when the system is always consistent), the empty list is returned:

In[6]:= |

Out[6]= |

The column space of a matrix is the null space of the coefficient matrix of its constraint equations. Begin with a matrix with rank 3:

In[7]:= |

Out[8]= |

The constraint equations are:

In[9]:= |

Out[9]= |

The coefficient matrix of the constraint equations is:

In[10]:= |

Out[10]= |

The null space of this matrix is:

In[11]:= |

Out[11]= |

These vectors are independent. To see that they are in the column space of the matrix A, simply verify that they satisfy the constraint equations:

In[12]:= |

Out[12]= |

The left null space of a matrix is the row space of the coefficient matrix of its constraint equations. Begin with a matrix with rank 3:

In[13]:= |

Out[14]= |

The constraint equations are:

In[15]:= |

Out[15]= |

The coefficient matrix of its constraint equations is:

In[16]:= |

Out[17]= |

The rows of this matrix span the left null space of A, since they are independent and satisfy BA=0:

In[18]:= |

Out[18]= |

- 2.0.0 – 31 August 2020
- 1.0.0 – 28 August 2019

This work is licensed under a Creative Commons Attribution 4.0 International License