Hongmu Notes

📏 Linear system solver

Fill in the coefficients of each equation and the constant term on the right side of the equal sign, use Gaussian elimination (column pivot) to find solutions to a system of linear equations of 2 to 6 elements, and automatically determine the unique solution, no solution, or infinite solutions.
100% Browser local processing 0 Data upload

📏 Solve systems of linear equations

Fill in one line for each equation: fill in the coefficients of each unknown number in turn, and fill in the constant term to the right of the equal sign in the last box.

💡 Instructions for use

  • Select the number of unknowns first, and the grid will automatically change to the corresponding size; each equation occupies one line, the coefficients of each unknown are listed horizontally, and the last grid is the constant term.
  • The coefficient supports negative numbers and decimals, and spaces will be automatically ignored; please convert the fraction into a decimal first, or multiply the entire equation by the same number into an integer.
  • Before solving, perform column pivot elimination first, and then back-substitute; the result area also provides the rank of the determinant, coefficient matrix, and augmented matrix as a basis for judging the solution.
  • The maximum residual is used for self-testing: a value close to 0 indicates a correct solution, and a significantly larger value indicates a problem with the input or the equation itself.

📏 When to use the two solutions?

The textbook solution to a system of two-dimensional equations is substitution elimination and addition, subtraction and elimination. Hand calculation is the most convenient. When the number of unknowns increases to more than three, item-by-item elimination is prone to errors. It is safer to use Gaussian elimination instead. This tool directly performs row transformation based on the augmented matrix. It can solve the number of unknowns from 2 to 6 at one time and automatically complete the determination. There is no need to judge whether the equation is independent in advance.

When filling in the numbers, fill in one line for each equation. The first column is the coefficient of each unknown variable, and the last column is the constant term on the right side of the equal sign.

🧠 Why do column pivots

When eliminating elements, the main diagonal element must be used as the divisor. If it happens to be close to 0, dividing by a very small number will greatly amplify the rounding error, and the result may be completely distorted. At each step of the column pivot, the element with the largest absolute value in the current column is first found and moved to the pivot position, and the divisor is enlarged as much as possible, thereby significantly improving the numerical stability. This is also a recommended approach for both manual calculation and program calculation.

A determinant of 0 indicates that the coefficient matrix is singular. The system of equations either has no solution or has infinite solutions. The tool will continue to give specific judgments.

🔍 How to judge the solution situation

After elimination, if the rank of the coefficient matrix is equal to the number of unknowns, the system of equations has a unique solution; when the rank is less than the number of unknowns and there are no contradictory rows (0 is equal to a non-zero constant), there are infinite solutions, and the number of free variables is equal to the number of unknowns minus the rank; once a contradictory row where 0 is equal to a non-zero constant appears, there is no solution. The three situations correspond geometrically to intersecting at a point, coinciding and being parallel to each other.

The result area will respectively provide the rank of the coefficient matrix and the rank of the augmented matrix. Comparing the two is the basis for judgment.

🔒 Data is not uploaded

Elimination and back-substitution are all completed locally in the browser, without calling the server computing interface, and no registration or login is required. The entered coefficients only exist on the current page and will be cleared when refreshing. Use the copy or download button when you need to save the results, and you will get a plain text report containing solution vectors and validation residuals.

The page is also available offline, making it suitable for checking assignments on a computer without a network connection.

🔗 All keywords and tutorials

Keywords page of the tool12a

Return to tool home page

❓ FAQ

A system of linear equations supports up to several unknowns?
It supports 2 to 6 unknowns. The number of equations is the same as the number of unknowns. It is solved according to the square matrix and the determinant is given to judge the uniqueness of the solution.
How to distinguish between no solution and infinite solutions?
If there is a contradictory row with 0 equal to a non-zero constant after elimination, there is no solution; if there is no contradictory row but the rank of the coefficient matrix is less than the number of unknowns, there are infinite solutions.
What is the use of the determinant in the result??
If the determinant is not 0, it means that the coefficient matrix is invertible and the system of equations has a unique solution; if the determinant is 0, then there is no solution or infinite solutions, and you need to look at the comparison of ranks.
What should I do if Gaussian elimination is easy to make mistakes by hand??
Hand calculations are prone to errors in symbols and back substitutions. Use the tool to calculate it again, and then compare the elimination matrix and residuals in the result to quickly locate which step you made wrong.
Can the entered coefficient be a decimal or a fraction??
Decimal and negative numbers can be entered. Please convert the fraction into a decimal first, or multiply the entire equation by a number and convert it into an integer before entering it.
What is the verification residual??
After substituting the obtained solution back into each original equation, the maximum absolute value of the difference between the left and right sides of the equal sign. Values ​​close to 0 indicate that the solution is correct, while significant deviations indicate that the input may be incorrect.