Matrix Operations
Gaussian Elimination (3 Variables)
Forward elimination of a 3-variable system. The unique solution is x=1, y=2, z=3.
gaussian_elimination([[1, 1, 1, 6], [2, -1, 1, 3], [1, 2, -1, 2]]) treats the last column as the constants of a three-variable system. Forward elimination and back substitution give the unique solution x = 1, y = 2, z = 3.
The same triple satisfies the original rows: 1 + 2 + 3 = 6, 2 − 2 + 3 = 3, and 1 + 4 − 3 = 2. The displayed form is row echelon form, not reduced row echelon form.
Equation
gaussian_elimination([[1,1,1,6],[2,-1,1,3],[1,2,-1,2]])
How the matrix operation is checked
Matrix commands in Solve Equation use nested brackets. multiply and matmul combine rows of the first matrix with columns of the second. matrix_add and matrix_subtract match entries in the same position. scalar_multiply scales every entry by one number. transpose, matrix_power, rank, trace, and rref stay exact. eigenvalues and eigenvectors come from det(A−λI)=0. gaussian_elimination and matrix_solve report a unique solution, an infinite solution set, or no solution. lu, qr, svd, cholesky, pinv, and least_squares factor a matrix or minimize a residual. Decimals are kept as exact fractions.
The inner dimensions must agree before any product is calculated, and every row of a matrix must have the same number of entries. A singular matrix has no negative power. An inconsistent linear system is not replaced by a least-squares guess; least_squares is a separate command. Cholesky rejects a matrix that is not symmetric or not positive definite. symbolic_matrix, complex_matrix, kronecker, hadamard, matrix_norm, charpoly, nullspace, jordan_form, matrix_exp, and matrix_log keep symbols and complex entries exact. The default matrix norm is the Frobenius norm. Jordan form, the exponential, and the logarithm explain a result that is not available over the rationals or on a branch cut. A card marked Expected Error is supposed to stop with a mathematical message. It should not return a product or a sum. Editing the brackets in the field below is the way to compare a valid shape with an invalid one.
Reading the input
gaussian_elimination([[1,1,1,6],[2,-1,1,3],[1,2,-1,2]])— This is a command. The name selects the routine, and the items inside the parentheses are its arguments.
Try a change
- Change one entry and choose Solve Equation again. The product, sum, or validation message should change with that entry.
- On an Expected Error card, repair the shape so the matrices agree, then solve again. A matching shape should return a matrix instead of an error.
Solve Equation opens the original input in the equation workspace and displays its symbolic results, conditions, and solution steps.