Mathematics desk | ||
---|---|---|
< August 6 | << Jul | August | Sep >> | August 8 > |
Welcome to the Wikipedia Mathematics Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
My linear algebra is rusty... Is there a simple and efficient way to find the eigendecomposition
of a n×n real-valued, asymmetric, diagonalizable, tridiagonal matrix A? All columns in A sum up to zero. All diagonal elements are negative, and all sub- and superdiagonal elements are positive. Thus, I know that the largest eigenvalue . n is in the range order 5-30. A typical example of A could be this matrix
[[-0.0733 0.0544 0. 0. 0. 0. 0. 0. 0. 0. ] [ 0.0733 -0.1226 0.0068 0. 0. 0. 0. 0. 0. 0. ] [ 0. 0.0682 -0.0931 0.0568 0. 0. 0. 0. 0. 0. ] [ 0. 0. 0.0863 -0.1185 0.0251 0. 0. 0. 0. 0. ] [ 0. 0. 0. 0.0617 -0.1658 0.1971 0. 0. 0. 0. ] [ 0. 0. 0. 0. 0.1407 -0.264 0.0093 0. 0. 0. ] [ 0. 0. 0. 0. 0. 0.0669 -0.03 0.0069 0. 0. ] [ 0. 0. 0. 0. 0. 0. 0.0207 -0.0117 0.0029 0. ] [ 0. 0. 0. 0. 0. 0. 0. 0.0048 -0.0095 0.0511] [ 0. 0. 0. 0. 0. 0. 0. 0. 0.0066 -0.0511]]
I have found a simple LU decomposition method for tridiagonal matrices
by which A can be decomposed into two tridiagonal matrices, where the superdiagonal elements are zero in L and the subdiagonal elements are zero in U and all diagonal elements are unity. Could this be of use?
I also found a §11.3 "Eigenvalues and Eigenvectors of a Tridiagonal Matrix" in Numerical recipes. However, §11.3 only seems to cover symmetric matrices.
I also have a copy of Matrix computations by Golub and van Loan, but I did not find any coverage of the topic there either. -- Slaunger ( talk) 14:03, 7 August 2012 (UTC)
I'm working on a project with Google Maps, which uses a Mercator projection.
Imagine I have one point on the map at position lat1, lng1.
I have another point on the map at position lat2, lng2.
What I want to do is find lat3, lng3, which is defined as being the same distance from lat1, lng1 as lat2, lng2 is, but rotate an arbitrary angle (say, -16 degrees).
It should look something like this, but on a map:
| | 3 | | 2 | | | 1 |______________________
How should I go about doing this? Obviously this is a rotational transformation on a 3-D surface (the Earth, and the distances for this application are sufficient than a 2-D abstraction will not work correctly).
If you could explain this in code or pseudocode it would be most helpful, as opposed to plunking down a matrix transformation or linking to this article which I have read but don't quite understand how to apply. The actual code is written in Javascript, which does not have any kind of standard rotational matrix function, so please don't rely on one of those...
Thanks in advance. -- Mr.98 ( talk) 20:32, 7 August 2012 (UTC)
Call the points A,B,C rather than 1,2,3. Let P be the north pole.
First consider the triangle PAB having angles P1=lng2−lng1, A1, B1 opposite the sides p1, a1=90°−lat2, b1=90°−lat1.
The spherical law of cosines gives p1, and the law of sines#spherical case gives A1
Next consider triangle PAC having angles P2, A2=A1−16°, C2 opposite the sides p2=p1, a2, c2=b1.
The law of cosines gives a2, and the law of sines gives P2
Then lat3=90°−a2 and lng3=lng1+P2 is your final answer. Bo Jacoby ( talk) 07:20, 8 August 2012 (UTC).
With a numeric example (lat1, lng1, lat2, lng2, rotation angle) we can try both methods and compare results and clarify the suspicion of instability. Spherical trigonometry has proved useful to astronomers during more than 500 years. Bo Jacoby ( talk) 20:37, 8 August 2012 (UTC).
To Slaunger: The OP gave the example '-16 degrees' indicating than 0.1 degrees accuracy is enough. To BenRG: If A and B are antipodal and C has the same distance from A as B, then the solution is trivial: C=B. Bo Jacoby ( talk) 11:57, 10 August 2012 (UTC).
Hmm, instead of the above maybe you should have a look at this online calculator, source code, and algorithms in linked pdf.— eric 18:30, 10 August 2012 (UTC)
Mathematics desk | ||
---|---|---|
< August 6 | << Jul | August | Sep >> | August 8 > |
Welcome to the Wikipedia Mathematics Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
My linear algebra is rusty... Is there a simple and efficient way to find the eigendecomposition
of a n×n real-valued, asymmetric, diagonalizable, tridiagonal matrix A? All columns in A sum up to zero. All diagonal elements are negative, and all sub- and superdiagonal elements are positive. Thus, I know that the largest eigenvalue . n is in the range order 5-30. A typical example of A could be this matrix
[[-0.0733 0.0544 0. 0. 0. 0. 0. 0. 0. 0. ] [ 0.0733 -0.1226 0.0068 0. 0. 0. 0. 0. 0. 0. ] [ 0. 0.0682 -0.0931 0.0568 0. 0. 0. 0. 0. 0. ] [ 0. 0. 0.0863 -0.1185 0.0251 0. 0. 0. 0. 0. ] [ 0. 0. 0. 0.0617 -0.1658 0.1971 0. 0. 0. 0. ] [ 0. 0. 0. 0. 0.1407 -0.264 0.0093 0. 0. 0. ] [ 0. 0. 0. 0. 0. 0.0669 -0.03 0.0069 0. 0. ] [ 0. 0. 0. 0. 0. 0. 0.0207 -0.0117 0.0029 0. ] [ 0. 0. 0. 0. 0. 0. 0. 0.0048 -0.0095 0.0511] [ 0. 0. 0. 0. 0. 0. 0. 0. 0.0066 -0.0511]]
I have found a simple LU decomposition method for tridiagonal matrices
by which A can be decomposed into two tridiagonal matrices, where the superdiagonal elements are zero in L and the subdiagonal elements are zero in U and all diagonal elements are unity. Could this be of use?
I also found a §11.3 "Eigenvalues and Eigenvectors of a Tridiagonal Matrix" in Numerical recipes. However, §11.3 only seems to cover symmetric matrices.
I also have a copy of Matrix computations by Golub and van Loan, but I did not find any coverage of the topic there either. -- Slaunger ( talk) 14:03, 7 August 2012 (UTC)
I'm working on a project with Google Maps, which uses a Mercator projection.
Imagine I have one point on the map at position lat1, lng1.
I have another point on the map at position lat2, lng2.
What I want to do is find lat3, lng3, which is defined as being the same distance from lat1, lng1 as lat2, lng2 is, but rotate an arbitrary angle (say, -16 degrees).
It should look something like this, but on a map:
| | 3 | | 2 | | | 1 |______________________
How should I go about doing this? Obviously this is a rotational transformation on a 3-D surface (the Earth, and the distances for this application are sufficient than a 2-D abstraction will not work correctly).
If you could explain this in code or pseudocode it would be most helpful, as opposed to plunking down a matrix transformation or linking to this article which I have read but don't quite understand how to apply. The actual code is written in Javascript, which does not have any kind of standard rotational matrix function, so please don't rely on one of those...
Thanks in advance. -- Mr.98 ( talk) 20:32, 7 August 2012 (UTC)
Call the points A,B,C rather than 1,2,3. Let P be the north pole.
First consider the triangle PAB having angles P1=lng2−lng1, A1, B1 opposite the sides p1, a1=90°−lat2, b1=90°−lat1.
The spherical law of cosines gives p1, and the law of sines#spherical case gives A1
Next consider triangle PAC having angles P2, A2=A1−16°, C2 opposite the sides p2=p1, a2, c2=b1.
The law of cosines gives a2, and the law of sines gives P2
Then lat3=90°−a2 and lng3=lng1+P2 is your final answer. Bo Jacoby ( talk) 07:20, 8 August 2012 (UTC).
With a numeric example (lat1, lng1, lat2, lng2, rotation angle) we can try both methods and compare results and clarify the suspicion of instability. Spherical trigonometry has proved useful to astronomers during more than 500 years. Bo Jacoby ( talk) 20:37, 8 August 2012 (UTC).
To Slaunger: The OP gave the example '-16 degrees' indicating than 0.1 degrees accuracy is enough. To BenRG: If A and B are antipodal and C has the same distance from A as B, then the solution is trivial: C=B. Bo Jacoby ( talk) 11:57, 10 August 2012 (UTC).
Hmm, instead of the above maybe you should have a look at this online calculator, source code, and algorithms in linked pdf.— eric 18:30, 10 August 2012 (UTC)