1 USING: help.markup help.syntax sequences ;
3 IN: math.matrices.elimination
6 { $values { "matrix" sequence } }
7 { $description "Computes the multiplicative inverse of a matrix. Assuming the matrix is invertible." }
9 "A matrix multiplied by its inverse is the identity matrix."
11 "USING: kernel math.matrices prettyprint ;"
12 "FROM: math.matrices.elimination => inverse ;"
13 "{ { 3 4 } { 7 9 } } dup inverse mdot 2 <identity-matrix> = ."
19 { $values { "matrix" sequence } { "matrix'" sequence } }
20 { $description "Computes the reduced row-echelon form of the matrix." } ;
23 { $values { "matrix" sequence } { "matrix'" sequence } }
24 { $description "Removes all all-zero rows from the matrix" }
27 "USING: math.matrices.elimination prettyprint ;"
28 "{ { 0 0 } { 5 6 } { 0 0 } { 4 0 } } nonzero-rows ."
36 { "n" "the index of the first match, or " { $link f } "." }
37 { "elt" "the first non-zero element, or " { $link f } "." }
39 { $description "Find the first non-zero element of a sequence." } ;