Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
add notes about not echolonizing kernels for inexact rings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kliem committed Jan 23, 2020
1 parent dde78cb commit 1db3349
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion src/sage/matrix/matrix2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3271,7 +3271,7 @@ cdef class Matrix(Matrix1):
returned exactly as provided by whichever routine actually
computed the basis. Request this for the least possible
computation possible, but with no guarantees about the format
of the basis.
of the basis. This option is recommended for inexact rings.

OUTPUT:

Expand Down Expand Up @@ -3678,6 +3678,28 @@ cdef class Matrix(Matrix1):
[-1 -y 1]
sage: set_verbose(0)

Over inexact rings:

For inexact rings one should avoid echolonizing if possible::

sage: A = Matrix(
....: [[ 0.0, 0.5, 0.8090169944],
....: [ 0.0, 0.5, -0.8090169944],
....: [ 0.0, -0.5, 0.8090169944],
....: [ 0.0, -0.5, -0.8090169944],
....: [ 0.5, 0.8090169944, 0.0],
....: [ 0.5, -0.8090169944, 0.0],
....: [ -0.5, 0.8090169944, 0.0],
....: [ -0.5, -0.8090169944, 0.0],
....: [ 0.8090169944, 0.0, 0.5],
....: [-0.8090169944, 0.0, 0.5],
....: [ 0.8090169944, 0.0, -0.5],
....: [-0.8090169944, 0.0, -0.5]]).transpose()
sage: (A*A.right_kernel_matrix().transpose()).norm() > 2
True
sage: (A*A.right_kernel_matrix(basis='computed').transpose()).norm() < 1e-15
True

Trivial Cases:

We test two trivial cases. Any possible values for the
Expand Down Expand Up @@ -3879,6 +3901,9 @@ cdef class Matrix(Matrix1):
For the left kernel, use :meth:`left_kernel`. The method
:meth:`kernel` is exactly equal to :meth:`left_kernel`.

For inexact rings use :meth:`right_kernel_matrix` with
``basis='computed'`` to avoid echolonizing.

INPUT:

- ``algorithm`` - default: 'default' - a keyword that selects the
Expand Down Expand Up @@ -4235,6 +4260,9 @@ cdef class Matrix(Matrix1):
For the right kernel, use :meth:`right_kernel`. The method
:meth:`kernel` is exactly equal to :meth:`left_kernel`.

For inexact rings use :meth:`right_kernel_matrix` with
``basis='computed'`` to avoid echolonizing.

INPUT:

- ``algorithm`` - default: 'default' - a keyword that selects the
Expand Down

0 comments on commit 1db3349

Please sign in to comment.