### 15.1.12 Subspace generated by the columns of a matrix

The colspace command finds a basis for the column space of a matrix.

- colspace takes one mandatory argument and one optional argument:
  - A, a matrix.
  - Optionally, var, a variable name.
- colspace(A ⟨,var ⟩) returns a matrix whose columns are a basis of the subspace generated by the columns of A. With the optional argument var, Xcas will store the dimension of the subspace generated by the columns of A.

#### Examples

colspace([[1,1,2],[2,1,3],[3,1,4]])

⎡ ⎢ ⎢ ⎣ |
−1 | 0
0 | −1
1 | −2
| ⎤ ⎥ ⎥ ⎦

colspace([[1,1,2],[2,1,3],[3,1,4]],dimension)

⎡ ⎢ ⎢ ⎣ |
−1 | 0
0 | −1
1 | −2
| ⎤ ⎥ ⎥ ⎦

dimension

2 |  |  |  |  |  |  |  |  |  |