ASCIIMath rendering of the current state (terminal output, not chainable).
LaTeX rendering of the current state (terminal output, not chainable).
The variables of the system, sorted. Setting the property accepts a string of letters or an array.
Add a system to this one, equation by equation. With an equation, a polynom or a number, add it to the
equation at position index.
Optionalindex: numberBuilds the LaTeX \left\{...\right. representation from an explicit equation list.
Called by tex with the reordered clone. Pass equations directly when
generating a step-by-step derivation on a non-standard equation list.
Equations to render (typically from a cloned/reordered system).
Optionaloperators: string[][]
Per-equation multiplier annotations. operators[i] lists
the multipliers shown as \cdot k next to equation i; each adds a |l
column. Negative values are wrapped in \left(...\right).
Full duplicate of this instance, including display state (selected form
and options set via as*** / with***). Distinct from copy.
Copy the mathematical state of another instance into this (display
state is NOT transferred — the receiver keeps its own formatting). Entry
point used when constructing/parsing from a same-type input. Distinct from
clone. Classes without a real implementation throw
NotImplementedError.
Replace the equations from rows of numbers: the coefficients of the variables, then the constant of the right
member. [[1, 1, 3], [1, -1, 1]] is x+y=3 and x-y=1.
the names given to the columns (default xyz).
Replace the equations. The variables are those found in them, in alphabetical order.
Replace the equations from a matrix, read as in fromComponents.
Replace the equations from vectors: each vector is a column, the last one holds the constants.
True when the variable appears in the system.
True when both systems have the same equations, in the same order.
True when the system has exactly one solution: it is consistent and its rank equals the number of variables.
A new equation: the first equation times its factor, plus the second equation times its factor. The system is not modified.
id is the position of the equation, factor its multiplier.
Multiply the equation at position index by a number, or every equation by the matching number of an array.
Optionalindex: numberReplace the equations with strings or equations.
Reduce every equation.
Put the variables on the left and the constant on the right in every equation.
Solves the system by Gauss-Jordan elimination on the augmented matrix.
Solution per variable, in variables order.[].Solution per variable with .value === Infinity.For each pair of equations (i, j), computes LCM-based multipliers that eliminate
variable by linear combination. The factors satisfy f_i·coeff_i + f_j·coeff_j = 0.
Pairs are sorted by |f_i| + |f_j| (smallest multipliers first).
Requires that all variable terms are on the left side of each equation.
Subtract a system from this one, equation by equation. With an equation, a polynom or a number, subtract it
from the equation at position index.
Optionalindex: numberBuilds the augmented matrix [A|b] for this system and marks the
partition at the variable count, enabling isConsistent() and
reducedRowEchelonForm() to interpret the coefficient vs. constant parts.
StaticsolutionStaticsolutionLaTeX form of a solution of a system: \left( 2 ; 1 \right).
A system of linear equations. Built from equations or strings (
new LinearSystem("x+y=3", "x-y=1")). The variables are found in the equations; solve uses Gauss-Jordan elimination. Operations modify the system and return it;clone()keeps the original.Example