# rref_sympy

compas.numerical.rref_sympy(A, tol=None)[source]

Reduced row-echelon form of matrix A.

Parameters
• A (array-like) – Matrix A represented as an array or list.

• tol (float) – Tolerance.

Returns

array – RREF of A.

Notes

A matrix is in reduced row-echelon form after Gauss-Jordan elimination, the result is independent of the method/algorithm used.

Examples

>>> A = [[1, 0, 1, 3], [2, 3, 4, 7], [-1, -3, -3, -4]]
>>> n = rref_sympy(A)
>>> array(n)
array([[1, 0, 1.00000000000000, 3.00000000000000],
[0, 1, 0.666666666666667, 0.333333333333333],
[0, 0, 0, 0]], dtype=object)