Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to use some of these algebra packages online ? I have some matrices that I would like to know the characteristic polynomial of. Where could I send them to get a nicely factorised answer ? My PC is very slow & it would be nice to use someone elses super powerful computer ! Any suggestions

share|cite|improve this question
I wouldn't qualify Mathematica as an algebra package... – Patrick Da Silva Mar 19 '12 at 16:32

For Mathematica, you can try Wolfram Alpha:

factor the characteristic polynomial of [[0, 3], [1, 4]]

For Sage, you can try There, you can do

import numpy
n=numpy.array([[0, 3],[1, 4]],'complex64')
m = matrix(n)

I'm not an expert on this in Sage, but the numpy appears to be necessary to get the polynomial to factor over the complex numbers.

Wolfram Alpha is going to be a lot more user friendly. Notice I just typed in the description of what I wanted and I got it. But, it's not as powerful because it's not a full fledged computer algebra system. If you want to do several steps of calculations where you use a previous step in the next one, it's going to be very difficult or impossible. But, with Sage, which can be used online for free, or you can download it for free, it will be more complicated to use but more powerful as well, overall. So, it depends on what your needs are.

share|cite|improve this answer
You can do it in Sage without importing numpy. See my answer below since I couldn't see how to format it nicely as a comment... Of course, if you only need this for small examples, then either way will work just fine! – Alex Mar 19 '12 at 17:40
@Alex Thanks for adding that. – Graphth Mar 19 '12 at 18:05

It depends on the size of your matrix. I am not aware of any utilities that are capable of uploading your files and working with them.

If your matrix is relatively small, you can try using Wolfram Alpha. But these days it became quite "heavy" and slower than it used to be, and also has significant limits on computations you can do with it, pushing you to upgrade to the Pro version.

You can use Maxima, Octave or Sage online -- those are free alternatives to Maple, Mathcad and Mathematica. Just Google for it: "maxima|octave|sage online", and you will see services such as (Maxima), (Octave), (Sage) etc. has nice reference with examples. For instance, here is the reference to the function you need:

share|cite|improve this answer

I'll add this as an answer since I can't see how to make it render well in a comment.

You can do this in Sage as Graphth points out, but you do not need to import numpy. You can instead write

F.<x> = PolynomialRing(CC)
M = Matrix([[0,-1],[1,1]])

If you want your characteristic polynomial to factor over another field, you can simply replace CC with that field. The real numbers are RR, and the finite field Z/pZ is Integers(p). If you want to factor over the rationals, it's even easier,

M = Matrix([[0,-1],[1,1]])

should give you what you want.

share|cite|improve this answer
Great, thanks! I am glad to know how to do this. – Graphth Mar 19 '12 at 18:05

You can try using Wolfram Alpha. If you want to know the characteristic polynomial of $$\begin{pmatrix} 2 & -1 \\ 3 & 4 \end{pmatrix}$$ enter

Characteristic polynomial of {{2, -1}, {3, 4}}

and you get this.

share|cite|improve this answer

You could use Wolfram Alpha For example, type in:

characteristic polynomial {{2,3}, {3,1}} and it will compute the characteristic polynomial for a matrix $\begin{pmatrix} 2&3 \\ 3&1 \end{pmatrix}$

share|cite|improve this answer

You also have pieces of Maple online here:

share|cite|improve this answer

I use: It is free. There is a quick reference to get you started:

Here is an example:

m:matrix([2,-1], [3,4]); charpoly(m, x); solve(%, x);

share|cite|improve this answer
The question asks about Mathematica and Maple, but your question does not seem to address those packages. If you are suggesting an alternative, please make that explicit. Factorization of the characteristic polynomial of a matrix was the main concern, but your linked resource does not seem to do that. – Rory Daulton Jan 17 at 23:48
Oops, I see that package does do the characteristic polynomial: sorry. But the rest of my comment stands. – Rory Daulton Jan 18 at 11:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.