# 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) -> x1*y1 - x2*y2 + x3*y3 into Sage. How do I do this?
I want to have 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 (with`x[1]`

etc.)? Or how can you specify the domain of a map? How would you do this?