Given the polynomial $f = (xy-yx)z \in \mathbb R[x,y,z]$, how can I evaluate it on matrices?
sage: A=random_matrix(QQ,2)
sage: A
[1 1]
[1 2]
sage: B=random_matrix(QQ,2)
sage: B
[ 0 0]
[-1 0]
sage: C=random_matrix(QQ,2)
sage: C
[ 1 -2]
[ 1 -1]
sage: R.<x,y,z> = PolynomialRing(QQ)
sage: f = (x*y-y*x)*z
sage: f(A,B,C)
0
sage: (A*B-B*A)*C
[-1 2]
[ 0 1]