Linear System Generator
Two equations in two unknowns is one thing; four in four is where elimination becomes a real procedure. These are built from the answer, so the solution is always whole numbers, and the coefficient matrix is redrawn until its determinant is non-zero — because a singular system has either no solution or infinitely many, and neither is the exercise.
What this generator does
Draws a coefficient matrix, rejects it if the determinant is zero, then chooses a whole-number solution and computes the constants from it. Showing the answer also shows the elimination: every row operation named, and the grid it produced printed under it, down to the identity where the answer can simply be read off.
How to use this tool
- Choose how many unknowns.
- Solve by elimination, or by Cramer's rule if you prefer determinants.
- Check your answer by substituting back into every equation.
- Reveal the solution to confirm.
Understanding the controls
- Matrix size
- Between 2 and 5 unknowns. Five is where elimination by hand starts to be a genuine exercise in bookkeeping.
- Seed
- Reproduces exactly the same system, so it can be set and marked later.
- Show the answer
- Reveals the value of every unknown and the elimination that reaches it, so the system can be set as an exercise, marked afterwards, and — more useful — compared line by line against what a student actually wrote.
Common use cases
- Elimination practice beyond the two-unknown case
- Cramer's rule exercises with a stated determinant
- Test systems for a solver, with the answer known
- Showing why a non-zero determinant is what guarantees one solution
- Setting the same system for a group from a seed
How this generator works
Because the solution is chosen first and the constants derived from it, the answer is exact and always whole. The check substitutes the solution back into every equation and requires each to balance exactly, and confirms the determinant is non-zero so the solution really is the only one. The working is checked separately and more strictly: every line is re-done by applying the operation it names to the grid above it and comparing, and the original answer is confirmed to satisfy every row of every intermediate grid — because working that reaches the right answer through a wrong line has still taught somebody something false. Every number in it is an exact fraction rather than a decimal.
Randomness and fairness
The coefficients and the solution are random; the constants follow from them. Seeded systems reproduce and are therefore explicitly not cryptographically secure, and unseeded ones use the browser's cryptographically secure generator.
For how randomness is produced across the whole site, see how Generate Random works.
Limitations and good to know
- Square systems only — over- and under-determined systems have different answers entirely.
- Solutions are always whole numbers, which is unrealistic but is what makes the arithmetic checkable.
- The working is Gauss—Jordan elimination, which ends at the identity so the answer can be read off. Cramer's rule, LU decomposition and back-substitution from a triangular form are all valid and none of them is what is shown.
- Coefficients can be zero, which occasionally makes a system easier than its size suggests.
- A system disappears when you leave; seed it to set the same one twice.
Privacy and your data
Coefficients and solutions are computed in your browser. Nothing about the system or your seed leaves the page.
Related generators
- Simultaneous Equations GeneratorPairs of linear equations built backwards from a whole-number solution, with the elimination worked out line by line.
- Eigenvalue Practice GeneratorMatrices with whole-number eigenvalues, built by conjugating a triangular matrix, with trace and determinant as the check.
- Matrix Question GeneratorMultiplication, determinant and inverse questions, with inverses built to have whole-number entries.
- Diophantine Equation GeneratorLinear equations in two unknowns over the integers, with the solvability test, a table of the solution family and the smallest non-negative answer.