Ask Your Question

mudd1's profile - activity

2021-02-14 10:13:43 +0200 received badge  Notable Question (source)
2019-03-05 15:01:21 +0200 received badge  Popular Question (source)
2013-06-16 19:43:51 +0200 commented answer Can I define an n-dimensional matrix?

Well, generally what I'd like to do is some linear algebra without specifying the number of dimensions but just getting results that are true for arbitrary *n*. Guess that was to general an answer? I figured out my current problems by hand but it'd still be nice to have a software that can do such things.

2013-06-15 16:08:56 +0200 received badge  Editor (source)
2013-06-15 15:52:18 +0200 asked a question 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
2013-06-15 10:10:36 +0200 received badge  Supporter (source)