Ask Your Question

Revision history [back]

You can always use a Python def:

sage: def f(v):
    return v.dot_product(vector((1,1)))

sage: f(vector((2,1)))
3