# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Find a basis for the intersection of subspaces of ℝ^n

Contributed by:
Dennis M Schneider

ResourceFunction["IntersectionBasis"][ finds a basis for the intersection of the subspaces of spanned by |

The method is based on expressing each subspace as the null space of a matrix and then finding the null space of the matrix obtained by stacking these matrices vertically.

The empty list spans the trivial subspace.

The intersection of two three-dimensional subspaces of :

In[1]:= |

Out[1]= |

Two subspaces are called disjoint if their intersection is the trivial space, and a basis for the trivial subspace is the empty list. These two subspaces are disjoint:

In[2]:= |

Out[2]= |

All vectors in the lists must have the same size:

In[3]:= |

Out[3]= |

Again, the vectors in the list must have the same size; the sizes of the vectors in the second list are 4 and 0:

In[4]:= |

Out[4]= |

Compare with the following. The first list has two elements, the second has one, and the third also has one:

In[5]:= |

Out[5]= |

- 1.0.0 – 24 September 2019

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