# Revision history [back]

### define map with vector argument(s)

(Is it possible to use LaTeX code here in order to get a nice output?)

Let's say I want to put the map phi: Q^3 x Q^3 -> Q defined by (x,y) -> x1y1 - x2y2 + x3*y3 into Sage. How do I do this? I want to have later:

sage: x=vector((1,2,3)); y=vector((2,3,1))
sage: phi(x,y)


Is it only possible via the def command (withx[1] etc.)? Or how can you specify the domain of a map?

### define map with vector argument(s)

(Is it possible to use LaTeX code here in order to get a nice output?)

Let's say I want to put the map phi: Q^3 x Q^3 -> Q defined by (x,y) -> x1y1 - x2y2 + x3*y3 into Sage. How do I do this? I want to have later:

sage: x=vector((1,2,3)); y=vector((2,3,1))
sage: phi(x,y)


Is it only possible via the def command (withx[1] etc.)? Or how can you specify the domain of a map?

### define Define map with vector argument(s)

(Is it possible to use LaTeX code here in order to get a nice output?)

Let's say I want to put the map phi: Q^3 x Q^3 -> Q defined by (x,y) -> x1y1 - x2y2 + x3*y3 into Sage. How do I do this? I want to have later:

sage: x=vector((1,2,3)); y=vector((2,3,1))
sage: phi(x,y)


Is it only possible via the def command (withx[1] etc.)? Or how can you specify the domain of a map?map? How would you do this?

### Define map with vector argument(s)

(Is it possible to use LaTeX code here in order to get a nice output?)

Let's say I want to put the map phi: Q^3 x Q^3 -> Q defined by (x,y) -> x1y1 - x2y2 + x3*y3 into Sage. How do I do this? I want to have later:later for example:

sage: x=vector((1,2,3)); y=vector((2,3,1))
sage: phi(x,y)


Then the output should be the value phi(x,y).

Is it only possible via the def command (withx[1] etc.)? Or how can you specify the domain of a map? How would you do this?