Jama does not have a function for computing the square root of a matrix.
If you have Google search for "Matrix square root" you will find several relevant articles.
If you have MATLAB, use "sqrtm".
Good luck.
-- Cleve Moler
_______________________________________
Sir, I am using Jama Matrix in my Project. In a stage of my project I need to find out the Square Root of a Jama matrix. How could I do this?
Thank you Sir
Your Sincerely,
Saswati Bhattacharjee
sqrt(A) = V * sqrt(D) * V^(-1)
Where sqrt(D) = [ sqrt(Di) ]
Please advise if you don't know how to proceed.
Kind Regards,
David G
https://math.nist.gov/javanumerics/jama/doc/Jama/EigenvalueDecomposition.html
Class EigenvalueDecomposition - NIST<https://math.nist.gov/javanumerics/jama/doc/Jama/EigenvalueDecomposition.html>
math.nist.gov
public class EigenvalueDecomposition extends Object implements Serializable. Eigenvalues and eigenvectors of a real matrix. If A is symmetric, then A = V*D*V' where the eig
________________________________
From: jama-bounces at nist.gov <jama-bounces at nist.gov> on behalf of Cleve Moler <Cleve.Moler at mathworks.com>
Sent: Wednesday, 20 June 2018 8:44:32 AM
To: csesaswati at gmail.com
Cc: ronald.boisvert at nist.gov; Jama users discussion list
Subject: [Jama] Matrix square root
Hello ?
Jama does not have a function for computing the square root of a matrix.
If you have Google search for ?Matrix square root? you will find several relevant articles.
If you have MATLAB, use ?sqrtm?.
g(A) = V * g(D) * V^(-1)
Where g(D) = [ g(Di) ]
Kind Regards,
David G
________________________________
From: jama-bounces at nist.gov <jama-bounces at nist.gov> on behalf of Cleve Moler <Cleve.Moler at mathworks.com>
Sent: Wednesday, 20 June 2018 8:44:32 AM
To: csesaswati at gmail.com
Cc: ronald.boisvert at nist.gov; Jama users discussion list
Subject: [Jama] Matrix square root
Hello ?
Jama does not have a function for computing the square root of a matrix.
If you have Google search for ?Matrix square root? you will find several relevant articles.
If you have MATLAB, use ?sqrtm?.
That doesn't work if V doesn't exist, i.e. A does not have a full set of linearly independent eigenvectors.
For example, A = [0 1; 0 0].
And it is a bad idea if V is nearly singular, i.e. if A is close to a matrix that does not have a full set of eigenvectors.
-- Cleve
From: jama-bounces at nist.gov [mailto:jama-bounces at nist.gov] On Behalf Of David Galea
Sent: Tuesday, June 19, 2018 5:41 PM
To: csesaswati at gmail.com; Jama users discussion list <ja...@list.nist.gov>
Cc: ronald.boisvert at nist.gov
Subject: Re: [Jama] Matrix square root
Cleve,
To find the sqrt of a matrix A, compute the Eigenvalue decomposition using the attached and then
sqrt(A) = V * sqrt(D) * V^(-1)
Where sqrt(D) = [ sqrt(Di) ]
Please advise if you don't know how to proceed.
Kind Regards,
David G
https://math.nist.gov/javanumerics/jama/doc/Jama/EigenvalueDecomposition.html<https://math.nist.gov/javanumerics/jama/doc/Jama/EigenvalueDecomposition.html>
Class EigenvalueDecomposition - NIST<https://math.nist.gov/javanumerics/jama/doc/Jama/EigenvalueDecomposition.html>
math.nist.gov
public class EigenvalueDecomposition extends Object implements Serializable. Eigenvalues and eigenvectors of a real matrix. If A is symmetric, then A = V*D*V' where the eig
________________________________
From: jama-bounces at nist.gov<mailto:jama-bounces at nist.gov> <jama-bounces at nist.gov<mailto:jama-bounces at nist.gov>> on behalf of Cleve Moler <Cleve.Moler at mathworks.com<mailto:Cleve.Moler at mathworks.com>>
Sent: Wednesday, 20 June 2018 8:44:32 AM
To: csesaswati at gmail.com<mailto:csesaswati at gmail.com>
Cc: ronald.boisvert at nist.gov<mailto:ronald.boisvert at nist.gov>; Jama users discussion list
Subject: [Jama] Matrix square root
Hello -
Jama does not have a function for computing the square root of a matrix.
If you have Google search for "Matrix square root" you will find several relevant articles.
If you have MATLAB, use "sqrtm".
I had a quick look and the Matlab documentation states that it uses the 'Blocked Schur Algorithms' to compute the square root. I have attached the article. It seems to be a fairly simple algorithm to implement. I would be happy to do so if people would like this done.
Kind Regards
<https://link.springer.com/chapter/10.1007/978-3-642-36803-5_12>https://repositorium.sdum.uminho.pt/bitstream/1822/23671/1/edvin_nick_rui.pdf
https://en.wikipedia.org/wiki/Square_root_of_a_matrix
Square root of a matrix - Wikipedia<https://en.wikipedia.org/wiki/Square_root_of_a_matrix>
en.wikipedia.org
In mathematics, the square root of a matrix extends the notion of square root from numbers to matrices.. Matrix B is said to be a square root of A if the matrix product B B is equal to A.
________________________________
From: Cleve Moler <Cleve.Moler at mathworks.com>
Sent: Saturday, 23 June 2018 7:25:45 AM
To: David Galea; ja...@list.nist.gov; csesaswati at gmail.com
Subject: RE: Matrix square root
David ?
That doesn?t work if V doesn?t exist, i.e. A does not have a full set of linearly independent eigenvectors.
For example, A = [0 1; 0 0].
And it is a bad idea if V is nearly singular, i.e. if A is close to a matrix that does not have a full set of eigenvectors.
-- Cleve
From: jama-bounces at nist.gov [mailto:jama-bounces at nist.gov] On Behalf Of David Galea
Sent: Tuesday, June 19, 2018 5:41 PM
To: csesaswati at gmail.com; Jama users discussion list <ja...@list.nist.gov>
Cc: ronald.boisvert at nist.gov
Subject: Re: [Jama] Matrix square root
Cleve,
To find the sqrt of a matrix A, compute the Eigenvalue decomposition using the attached and then
sqrt(A) = V * sqrt(D) * V^(-1)
Where sqrt(D) = [ sqrt(Di) ]
Please advise if you don't know how to proceed.
Kind Regards,
David G
https://math.nist.gov/javanumerics/jama/doc/Jama/EigenvalueDecomposition.html
Class EigenvalueDecomposition - NIST<https://math.nist.gov/javanumerics/jama/doc/Jama/EigenvalueDecomposition.html>
math.nist.gov
public class EigenvalueDecomposition extends Object implements Serializable. Eigenvalues and eigenvectors of a real matrix. If A is symmetric, then A = V*D*V' where the eig
Class EigenvalueDecomposition - NIST<https://math.nist.gov/javanumerics/jama/doc/Jama/EigenvalueDecomposition.html>
public class EigenvalueDecomposition extends Object implements Serializable. Eigenvalues and eigenvectors of a real matrix. If A is symmetric, then A = V*D*V' where the eig
________________________________
From: jama-bounces at nist.gov<mailto:jama-bounces at nist.gov> <jama-bounces at nist.gov<mailto:jama-bounces at nist.gov>> on behalf of Cleve Moler <Cleve.Moler at mathworks.com<mailto:Cleve.Moler at mathworks.com>>
Sent: Wednesday, 20 June 2018 8:44:32 AM
To: csesaswati at gmail.com<mailto:csesaswati at gmail.com>
Cc: ronald.boisvert at nist.gov<mailto:ronald.boisvert at nist.gov>; Jama users discussion list
Subject: [Jama] Matrix square root
Hello ?
Jama does not have a function for computing the square root of a matrix.
If you have Google search for ?Matrix square root? you will find several relevant articles.
If you have MATLAB, use ?sqrtm?.