You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: base/docs/helpdb.jl
+30-4Lines changed: 30 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7006,7 +7006,19 @@ doc"""
7006
7006
::
7007
7007
logm(A)
7008
7008
7009
-
Compute the matrix logarithm of ``A``.
7009
+
If ``A`` has no negative real eigenvalue, compute the principal matrix logarithm of ``A``, i.e. the unique matrix :math:`X` such that :math:`e^X = A` and :math:`-\pi < Im(\lambda) < \pi` for all the eigenvalues :math:`\lambda` of :math:`X`. If ``A`` has nonpositive eigenvalues, a warning is printed and whenever possible a nonprincipal matrix function is returned.
7010
+
7011
+
If `A` is symmetric or Hermitian, its eigendecomposition (:func:`eigfact`) is used, if `A` is triangular an improved version of the inverse scaling and squaring method is employed (see [AH12]_ and [AHR13]_). For general matrices, the complex Schur form (:func:`schur`) is computed and the triangular algorithm is used on the triangular factor.
7012
+
7013
+
.. [AH12] Awad H. Al-Mohy and Nicholas J. Higham, "Improved inverse scaling
7014
+
and squaring algorithms for the matrix logarithm", SIAM Journal on
Compute the matrix square root of ``A``. If ``B = sqrtm(A)``, then ``B*B == A`` within roundoff error.
10728
+
If ``A`` has no negative real eigenvalues, compute the principal matrix square root of ``A``, that is the unique matrix :math:`X` with eigenvalues having positive real part such that :math:`X^2 = A`. Otherwise, a nonprincipal square root is returned.
10717
10729
10718
-
``sqrtm`` uses a polyalgorithm, computing the matrix square root using Schur factorizations (:func:`schurfact`) unless it detects the matrix to be Hermitian or real symmetric, in which case it computes the matrix square root from an eigendecomposition (:func:`eigfact`). In the latter situation for positive definite matrices, the matrix square root has ``Real`` elements, otherwise it has ``Complex`` elements.
10730
+
If `A` is symmetric or Hermitian, its eigendecomposition (:func:`eigfact`) is used to compute the square root. Otherwise, the square root is determined by means of the Björck-Hammarling method, which computes the complex Schur form (:func:`schur`) and then the complex square root of the triangular factor.
10731
+
10732
+
.. [BH83] Åke Björck and Sven Hammarling, "A Schur method for the square root
10733
+
of a matrix", Linear Algebra and its Applications, 52-53, 1983, 127-140.
Compute the matrix exponential of ``A``, defined by
10770
+
10771
+
.. math::
10772
+
e^A = \sum_{n=0}^{\inf} \dfrac{A^n}{n!}.
10773
+
10774
+
For symmetric or Hermitian ``A``, an eigendecomposition (:func:`eigfact`) is used, otherwise the scaling and squaring algorithm (see [H05]_) is chosen.
10775
+
10776
+
.. [H05] Nicholas J. Higham, "The squaring and scaling method for the matrix
10777
+
exponential revisited", SIAM Journal on Matrix Analysis and Applications,
0 commit comments