The expand command multiplies out products and powers in an expression A. An optional second argument P specifies the modulus.
expand((x+1)*(x-1)); -1+x^2 expand((x+1)*(x-1),11); 10+x^2