|   | 1 |  initial version  | 
I'm not so sure that xy-xy can ever be non-zero and still provide arithmetic in which linear algebra operations make sense. For non-commuting variables, one can get at least something:
sage: A.<x,y>=FreeAlgebra(QQ)
sage: M=matrix([[x,y],[y*x,y^2]])
sage: M
[  x   y]
[y*x y^2]
sage: M.determinant()
x*y^2 - y*x*y
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.