# Can I define an n-dimensional matrix?

I'm sure this is a basic question that has been asked before but I'm too stupid to find it.

What I'd like to do is something like this

```
k=var('n')
assume(n, 'integer')
assume(n>0)
VS = MatrixSpace(SR, n, 1)
```

to get the space of all *n*×1 matrices, i.e. column vectors. Is it at all possible to define a generalized *n*-dimensional vector or *n×n* matrix? Or am I just taking the completely wrong approach here?

**Edit:** Forgot to mention that the error I get is

```
ValueError: cannot convert n to int
```