# Looking for web app resources for symbolic Gaussian elimination

I am looking for a web app software that takes step-by-step directions from a student to perform the linear combination operation on a matrix with symbolic coefficients (as opposed to just numbers). So, student indicates to software to replace row $$k$$ with some symbolic multiple of row $$i$$ plus a multiple of row $$j$$. The software only carries out this step.

Edit 1

One of the answers below refers to a WolframAlpha System Solver.

The answer by Thierry points to MatrixCalc which asks students to participate in taking the required steps. Note: certain symbols are pre-defined.

Edit 2

The application:

A 2*2 system of linear constant coefficient ODEs for $$x=x(t), y=y(t)$$ will be $$\begin{matrix} L_{11}x &+L_{12}y= f(t) \newline L_{21}x &+L_{22}y= g(t) \end{matrix}$$ where $$L_{ij}$$ is a differential operator with constant coefficients. For example $$L_{11}=D^2+3D+4$$ where $$D=d/dt$$. Now we want to, say, eliminate $$y$$, so we multiply row 1 by a suitable factor (a polynomial in $$D$$), and also row 2, and add the rows to get a single ODE for $$x(t)$$.

First-order cases are seen in problems related to systems of mixing tanks, the second-order cases in spring-mass systems.

For a 3*3 system and above an app will be helpful. Just as it is in linear algebra (see the apps Justin Skykac has listed below for numerical cases).

• I expect that you could do this Sage. Sep 11 at 18:59
• Gaussian elimination is not well-suited for symbolic computations: one needs to distinguish a lot of different cases as one does not know which elements that occur during the algorithm are non-zero. It seems that's one (the main?) reason why physicists are so much into Cramer's rule (it works well for symbolic computations in small dimensions, despite its extremely bad performance for numeric matrices in higher dimension). Sep 12 at 0:39
• @JochenGlueck In my application no division is carried out, just elimination. But I understand that a full-scale version is probably beyond a web-app page. Sep 12 at 15:40
• @Maesumi So are saying that an example of row of a matrix being reduced is $[1\ \ 1\ -3]$ corresponding the polynomial $x^2+x-3=0$ where the indeterminate $x$ is a differential operator? This would not be in the realm of symbolic coefficients. In this example the coefficients are specific integers. Sep 13 at 18:03
• @Maesumi Now your quest is more clear. The coefficients you are working with are from a polynomial ring. Sep 14 at 11:41

I like this site for matrix computations: https://matrixcalc.org/

I don't think you can directly tell it to add $$k$$ times row $$j$$ to row $$m$$, so instead you have to multiply by the appropriate matrix $$A$$, which is easy enough. It works well with symbolic entries, it's easy to update matrices $$A$$ and $$B$$ as you progress, and it keeps a record of your computations. Might not be exactly what you want but check it out.

• It is neat. But alas, it assumes combinations of coefficients are non-zero. With $\left(\begin{matrix} a & b & c \\ d & f & g \\ h & j & k \end{matrix}\right)$ it produces $\left(\begin{matrix} a & b & c \\ 0 & \frac{-b*d+a*f}{a} & \frac{-c*d+a*g}{a} \\ 0 & 0 & \frac{c*f*h-b*g*h-c*d*j+a*g*j+b*d*k-a*f*k}{b*d-a*f} \end{matrix}\right)$, overlooking nuances such as $a=0$ or $bd-af=0$. Sep 18 at 2:32
• Great find! Know of the site, but did not know it accepts symbols! Some symbols have internal meanings, including E,I,i. Sep 18 at 12:12

[Edit: the tools listed below work only with numeric coefficients, not symbolic coefficients.]

Tool #1: https://www.zweigmedia.com/RealWorld/tutorialsf1/scriptpivotold.html

This is my favorite. As a demonstration, in the screenshot below, I have entered

• the matrix $$\begin{bmatrix} 1 & 2 & 3 \\ 1 & 1 & 0 \\ 0 & 1 & 1 \end{bmatrix}$$ and

• the row operation $$1 \times \textrm{Row 2} + 5 \times \textrm{Row 3}.$$

If I press the $$\fbox{Do It}$$ button, then it will replace $$\textrm{Row 2}$$ with $$1 \times \textrm{Row 2} + 5 \times \textrm{Row 3},$$ resulting in the matrix $$\begin{bmatrix} 1 & 2 & 3 \\ 1 & 6 & 5 \\ 0 & 1 & 1 \end{bmatrix}.$$

(In general, supplying the input $$a \times \textrm{Row } i + b \times \textrm{Row } j$$ will replace $$\textrm{Row } i$$ with the given expression.)

Tool #2: https://maa.org/book/export/html/117002

This one has a nicer interface, but it requires Adobe Flash Player, which you may have to install separately (whereas Tool #1 works right out of the box and seems like it has effectively the same functionality, even if it's not as pretty).

• Will either of these work with variables instead of numbers? Sep 11 at 15:53
• No. Whoops, didn't notice that part of the question. Will put note in answer. Sep 11 at 18:04
• What makes this tricky to do with symbolic coefficients is that we might not recongnize expressions in the symbols that are zero. For example, consider the two equations $ax+by=1$ and $cx+dy=2$. What happens if $ad-bc=0$? Sep 11 at 22:26

I think the question with the requirement of symbolic coefficients needs to be rethought. In Wolfram Alpha, we can put in the general form of three linear equations.

The output gets complicated because we need to know something about the determinant of the coefficients.

• Hmm, I seem to be unable to correctly interpret the output of Wolfram alpha. What precisely is the logical relation between the output and the equations in the input? For instance, the input equations do not imply $c\not=0$, but still this condition occurs in the output. Sep 12 at 0:47
• To be honest, I don't see the relevance of the conditions $c\not=0$ and $ec-bf\not=0$ at all. Maybe Wolfram alpha did indeed do some kind of Gauss elimination and thereby just assumed certain entries to be non-zero? Sep 12 at 0:50
• @JochenGlueck In the first draft I cut off much of the solution because it gets so messy. I put in a more detailed image. This might help. The point is that generically we can row reduce to the solutions given by Cramer. But the special cases when the rank is two or one make the representation with symbolic coefficients very messy, and this is just for $n=3$. Sep 12 at 2:19
• Might $e$ be being interpreted as a constant and fouling up the result anticipated by any chance? (I did see you took care concerning $i$ so you might know something I don't) Sep 12 at 2:48
• @Vandermonde yes I overlooked the possibility that WolframAlpha might interpret e as exp(1). But still, row reducing with symbolic coefficients is dubious. Might as well represent with Cramer’s Rule if we want to gloss over the lower rank cases. Sep 12 at 2:56