Function Repository Resource:

# SameSpanQ

Determine whether two lists of vectors span the same subspace

Contributed by: Dennis M Schneider
 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.

## Details and Options

The list of vectors may be a list of matrices.

## Examples

### Basic Examples (1)

Test whether two lists of vectors in span the same subspace:

 In:= Out= ### Scope (12)

#### Vectors in ℂ^n (4)

Test vectors in :

 In:= Out= 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:= Out= Check that the vectors in the first list are in the span of the vectors in the second list:

 In:= Out= Check that the vectors in the second list are in the span of the vectors in the first list:

 In:= Out= #### Spaces of matrices (4)

The standard basis for the space of 2×4 matrices is:

 In:= Out= Test whether the following list of eight vectors spans the same subspace as basis:

 In:= In:= Out= The eighth matrix in the list is a linear combination of the second and seventh vectors:

 In:= Out= Check:

 In:= Out= #### Function spaces (4)

Two lists of polynomials that determine the same subspace:

 In:= Out= The Legendre polynomials of degree at most n span the same subspace as the space of polynomials of degree at most n:

 In:= Out= Two lists of trigonometric functions that span the same subspace:

 In:= Out= Two lists of exponential, trigonometric and hyperbolic functions that span the same subspace:

 In:= Out= ## Publisher

Dennis M Schneider

## Version History

• 1.0.0 – 23 September 2019