bkfact
.. bkfact(A) -> BunchKaufman
Compute the Bunch-Kaufman [Bunch1977]_ factorization of a real symmetric or complex Hermitian matrix ``A`` and return a ``BunchKaufman`` object. The following functions are available for ``BunchKaufman`` objects: ``size``, ``\``, ``inv``, ``issym``, ``ishermitian``.
.. [Bunch1977] J R Bunch and L Kaufman, Some stable methods for calculating inertia and solving symmetric linear systems, Mathematics of Computation 31:137 (1977), 163-179. `url <http://www.ams.org/journals/mcom/1977-31-137/S0025-5718-1977-0428694-0>`_.
Examples
The bkfact
function in Julia computes the Bunch-Kaufman factorization of a real symmetric or complex Hermitian matrix A
and returns a BunchKaufman
object. The BunchKaufman
object has the following functions available: size
, transpose
, inv
, issym
, and ishermitian
.
Here are some examples of how to use the bkfact
function:
julia> A = [4.0 1.0 1.0; 1.0 5.0 2.0; 1.0 2.0 6.0];
julia> bk = bkfact(A)
BunchKaufman{Float64,Array{Float64,2}}
D factor:
3-element Array{Float64,1}:
4.0
4.0
4.0
L factor:
3×3 Array{Float64,2}:
1.0 0.0 0.0
0.25 1.0 0.0
0.25 0.4 1.0
julia> B = [1.0+2.0im 2.0-1.0im 3.0+4.0im; 2.0+1.0im 1.0+3.0im 4.0-2.0im; 3.0-4.0im 4.0+2.0im 1.0-5.0im];
julia> bk = bkfact(B)
BunchKaufman{ComplexF64,Array{ComplexF64,2}}
D factor:
3-element Array{ComplexF64,1}:
1.0 + 2.0im
-12.0 + 0.0im
-4.0 - 8.0im
L factor:
3×3 Array{ComplexF64,2}:
1.0+0.0im 0.0+0.0im 0.0+0.0im
2.0-1.0im 1.0+0.0im 0.0+0.0im
3.0+4.0im 4.0-2.0im 1.0+0.0im
Note: In the examples above, the matrices A
and B
are used to demonstrate the usage of bkfact
function. The resulting BunchKaufman
object bk
contains the D factor and L factor of the factorization.
For more information on the Bunch-Kaufman factorization, you can refer to the research paper by Bunch and Kaufman titled "Some stable methods for calculating inertia and solving symmetric linear systems" published in Mathematics of Computation in 1977.
See Also
User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.