# Can One use mathematica or maple online?

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

• I wouldn't qualify Mathematica as an algebra package... Mar 19, 2012 at 16:32

For Mathematica, you can try Wolfram Alpha:

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


For Sage, you can try Sagenb.org. There, you can do

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


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.

• 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, 2012 at 17:40
• @Alex Thanks for adding that. Mar 19, 2012 at 18:05
• I shut sagenb.org down and replaced it by cocalc.com. Also, there's sagecell.sagemath.org if you want a quick way to do something using Sage, Python, etc. without signing in. Apr 5, 2023 at 18:51

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]])
F(M.charpoly()).factor()


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]])
M.charpoly().factor()


should give you what you want.

• Great, thanks! I am glad to know how to do this. Mar 19, 2012 at 18:05

You also have pieces of Maple online here: - via icons: http://www.maplesoft.com/products/StudentApps/index.aspx - via list: https://maple.cloud/

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-online.org (Maxima), online-utility.org (Octave), sagenb.org (Sage) etc.

maxima-online.org has nice reference with examples. For instance, here is the reference to the function you need: http://maxima-online.org/help/index/charpoly

Next to Wolfram Alpha you can also try the Wolfram Cloud on http://sandbox.open.wolframcloud.com, which allows you to enter and execute multiple Mathematica commands using an online Notebook document.

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}$

I use: http://www.nu-math.com/omega It is free. There is a quick reference to get you started: http://www.nu-math.com/nhome/qr.jsp

Here is an example:

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

• 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. Jan 17, 2016 at 23:48
• Oops, I see that package does do the characteristic polynomial: sorry. But the rest of my comment stands. Jan 18, 2016 at 11:10