All published worksheets from http://sagenb.org
x := X(Rationals);; mat := One(x)*[[-2,x],[x^2-2*x,x]]; Determinant(mat);