Ask Your Question

Revision history [back]

I would advise to work with a list of vectors and make loops as you suggested. You can write a function grid(v1,v2) (plus fancy parameters) and apply it to grid(A*v1,A*v2).

I would advise to work with a list of vectors and make loops as you suggested. You can write a function grid(v1,v2) (plus fancy parameters) and apply it to grid(A*v1,A*v2).

About Sage, i would start by:

sage: V = VectorSpace(QQ,2)
sage: v1, v2 = V.basis()

So that my vectors live in a safe place. Then, after defining a grid() function that returns a Graphics() object built as a sum of lines(), i would write:

sage: grid(v1, v2, color='blue') + grid(M*v1, M*v2, color='red')

I would advise to work with a list of vectors and make loops as you suggested. suggested, this is a smart way. You can write a function grid(v1,v2)grid(v1, v2) (plus fancy parameters) and apply it to grid(A*v1,A*v2)grid(M*v1, M*v2) for some matrix M.

About Sage, i would start by:

sage: M = matrix(QQ, [[1,1],[1,0]])
sage: V = VectorSpace(QQ,2)
VectorSpace(QQ, 2)
sage: v1, v2 = V.basis()

So that my vectors live in a safe place. place (you can of course replace QQ with another field if needed). Then, after defining a grid() function that returns a Graphics() object built as a sum of lines(), i would write:

sage: grid(v1, v2, color='blue') + grid(M*v1, M*v2, color='red')

I would advise to work with a list of vectors and make loops as you suggested, this is a smart way. You can write a function grid(v1, v2) (plus fancy parameters) and apply it to grid(M*v1, M*v2) for some matrix M.

About Sage, i would start by:

sage: M = matrix(QQ, [[1,1],[1,0]])
sage: V = VectorSpace(QQ, 2)
sage: v1, v2 = V.basis()

So that my vectors live in a safe place (you can of course replace QQ with another field if needed). needed, typically if you want to draw rotations using sinus and cosinus). Then, after defining a grid() function that returns a Graphics() object built as a sum of lines(), i would write:

sage: grid(v1, v2, color='blue') + grid(M*v1, M*v2, color='red')

Do not hesitate to ask for details about the grid() function if needed.

I would advise to work with a list of vectors and make loops as you suggested, this is a smart way. You can write a function grid(v1, v2) (plus fancy parameters) and apply it to grid(M*v1, M*v2) for some matrix M.

About Sage, i would start by:

sage: M = matrix(QQ, [[1,1],[1,0]])
sage: V = VectorSpace(QQ, 2)
sage: v1, v2 = V.basis()

So that my vectors live in a safe place (you can of course replace QQ with another field if needed, typically if you want to draw rotations using sinus and cosinus). Then, after defining a grid() function that returns a Graphics() object built as a sum of lines(), i would write:

sage: grid(v1, v2, color='blue') + grid(M*v1, M*v2, color='red')

To get something like that picture

Do not hesitate to ask for details about the grid() function if needed.

I would advise to work with a list of vectors and make loops as you suggested, this is a smart way. You can write a function grid(v1, v2) (plus fancy parameters) and apply it to grid(M*v1, M*v2) for some matrix M.

About Sage, i would start by:

sage: M = matrix(QQ, [[1,1],[1,0]])
sage: V = VectorSpace(QQ, 2)
sage: v1, v2 = V.basis()

So that my vectors live in a safe place (you can of course replace QQ with another field if needed, typically if you want to draw rotations using sinus and cosinus). Then, after defining a grid() function that returns a Graphics() object built as a sum of lines(), i would write:

sage: grid(v1, v2, color='blue') + grid(M*v1, M*v2, color='red')

To get something like that picture

grids

Do not hesitate to ask for details about the grid() function if needed.

I would advise to work with a list of vectors and make loops as you suggested, this is a smart way. You can write a function grid(v1, v2) (plus fancy parameters) and apply it to grid(M*v1, M*v2) for some matrix M.

About Sage, i would start by:

sage: M = matrix(QQ, [[1,1],[1,0]])
sage: V = VectorSpace(QQ, 2)
sage: v1, v2 = V.basis()

So that my vectors live in a safe place (you can of course replace QQ with another field if needed, typically if you want to draw rotations using sinus and cosinus). Then, after defining a grid() function that returns a Graphics() object built as a sum of lines(), i would write:

sage: grid(v1, v2, color='blue') + grid(M*v1, M*v2, color='red')

To get something like that picture

gridspicture:

grids

Do not hesitate to ask for details about the grid() function if needed.