Smith Normal Form Stepper

Reduces a matrix over Z, a field or K[x] to its normal form one invertible row or column step at a time, with live P and Q factors and determinantal divisors that never change. The learner steps, types their own steps or edits the matrix, then reads off the presented abelian group or module (free rank, torsion, invariant factors, elementary divisors), the rank, an operator's invariant factors from xI - A, or, in symmetric mode, a congruence diagonal form with its inertia.

Used in: Group Theory, Ring Theory

Props

PropTypeDefaultDescription
titlestringby mode, e.g. "Smith normal form over ℤ"Title bar text.
matrix(number | string)[][][[2,4,4],[-6,6,12],[10,-4,-16]]Starting matrix, at most 8 x 8. Entries are numbers or strings: "1/2", "-3", and over K[x] polynomials such as "x^2 - 1" or "(x-1)^2".
ringstring"Z" ("Q[x]" with characteristicMatrixOf)Ring of the entries: "Z"; a field "Q", "R" (computed exactly over Q), "F_p" / "Z/p" / "GF(p)" for a prime p; or a polynomial ring "Q[x]", "F_p[x]", "k[x]" (k = Q). Z[x] and Z/n for composite n are refused with a message.
characteristicMatrixOfnumber[][]noneSquare matrix A: the stepper starts from xI - A over K[x] (ring defaults to Q[x]) and reads the result as A's invariant factors, minimal and characteristic polynomial, rational canonical blocks and elementary divisors.
mode"smith" | "symmetric""smith"smith: independent row and column steps, P A Q = D (over a field this is the rank normal form). symmetric: every column step is repeated on the rows (congruence P^T A P) with a zero-pivot fix-up, ending at a diagonal Gram matrix with its inertia. Needs a square symmetric matrix over a field (Z is read as Q).
relations"rows" | "columns""rows"Whether the rows or the columns are the relations of the presented group / module; the other dimension counts the generators (this sets the free rank).
readout"auto" | "group" | "module" | "operator" | "rank" | "invariant-factors""auto"How the finished form is read: group over Z, module over K[x], operator with characteristicMatrixOf, rank over a field; invariant-factors shows only the divisibility chain. Symmetric mode always reads the diagonal form and inertia.
stepnumber0Number of algorithm steps already applied on load; any number at least the step count shows the finished form.
showFactorsbooleantrueShow the accumulated P and Q (symmetric: P) with P A Q (P^T A P) equal to the current matrix.
showInvariantsbooleantrueLive invariants of the current matrix: determinantal divisors D_k (rank over a field; rank and determinant sign / square class in symmetric mode).
showElementaryDivisorsbooleantrueAdd the elementary divisors (prime-power factors of the invariant factors) to the final readout.
showRelationsbooleantrueOver Z, list the relations 2e_1 = 0, ... read from the starting matrix (up to 6 relations).
allowManualbooleantrueShow the input where the learner types steps (r_2 = r_2 - 3r_1, c_1 <-> c_3, r_1 = -r_1) with a Hint button. Scaling must be by a unit of the ring.
editablebooleantrueShow the Matrix button for typing a different starting matrix.
emphasize"none" | "decomposition" | "free-rank" | "torsion" | "invariant-factors" | "elementary-divisors" | "determinantal-divisors" | "rank" | "inertia""none"Highlight one readout row (the one the node is about).
controlsstring[]all controls shownIds of the hideable readouts to show (see the controls registry, e.g. readout.free-rank, readout.torsion, readout.invariant-factors, readout.quotient). Core controls always show. Page building fills this from the subject's topic scope.