See http://sympy.org/ and http://numpy.scipy.org/.
Specifically, http://docs.scipy.org/doc/numpy/reference/routines.linalg.html
And http://docs.sympy.org/0.7.0/tutorial.html#algebra, http://docs.sympy.org/dev/modules/solvers/solvers.html
Edit: Added solvers link from the comment.