| Topic: |
Science > Physics |
| User: |
"" |
| Date: |
24 Oct 2006 09:33:16 AM |
| Object: |
The cosine of a matrix |
In this article we shall derive an explicit formula for the cosine of a
matrix.
Consider the cosine function. It is true that the cosine function can
be defined by its Maclaurin series expansion of the form,
[1] cos x = SUM(n=0)^INF (-1)^n x^(2n) / (2n)!
By simply substituting x with some arbitrary square matrix A, we can
similary define cosine of a A as:
[2] cos A = SUM(n=0)^INF (-1)^n A^(2n) / (2n)!
It is true that such a substitution is valid since taking the natural
powers of square matrices always exist.
But, for [2] to be of some utility we need to know if it converges for
arbitrary A. It turns out that for all A, cos A converges thus it is
well-defined.
In the case of a 2x2 matrix, the matrix cosine becomes
[3] cos A = cos[a b]
[c d]
If we naively expand [3] using [2] we will not get a formula which
lends itself easily to computation.
We need to find a better solution.
It is known from the Cayley-Hamilton theorem that every function of an
NxN matrix can be written as a (matrix) polynomial of degree (N-1).
In the case of [3] we can say
[4] cos A = k1 A + k0 I
where k1,k0 are two scalars and I the 2x2 identity matrix.
In component form, [4] evaluates to
[5] cos A = [a.k1+k0 k0 ]
[c.k1 d.k1+k0]
If we solve for the constants k1, k0, we have an explicit formula at
least for a 2x2 matrix).
Now, it is also true from the Cayley-Hamilton theorem that
[6] cos(x) = k1 x + k0
for all eigenvalues x of A.
Since A is a 2x2 matrix, cos(A) is a 2x2 matrix. Since all 2x2 matrices
have 2 eigenvalues x1,x2, [5] becomes two simulanteous linear
equations,
[7] cos(x1) = k1 x1 + k0
[8] cos(x2) = k1 x2 + k0
Converting into matrix form,
[8.1] [ cos(x1) ] = [x1 1] [k1]
[ cos(x2) ] [x2 1] [k0]
Solving for k1 and k0 through Gauss-Jordan elimination (or Cramers
rule) gives,
[9] k1 = (cos(x1) - cos(x2)) / (x1 - x2)
[10] k0 = (x2 cos(x1) - x1 cos(x2)) / (x2 - x1)
Subsitution of [9] and [10] into [5] gives
[11] cos [a b] = [u1 u2]
[c d] [u3 u4]
where
u1 = (cos(x2).a-cos(x1).a+x2.cos(x1)-x1.cos(x2))/(x2-x1)
u2 = b (cos(x1) - cos(x2) ) / (x1 - x2)
u3 = c (cos (x1 - cos(x2) ) / (x1 - x2)
u4 = (cos(x2) d - cos(x1) d + x2 cos(x1) - x1 cos(x2) ) / (x2-x1)
Which gives us an solution to the matrix cosine of A in terms of the
eigenvalues of A.
We said before that a 2x2 matrix has 2 eigenvalues, and this is true
because the characteristic polynomial of A expands as a quadratic
equation. That is,
[12] 0 = det (A - xI) = det |a-x b| = (a-x)(d-x) - bc
|c d-x|
Luckily, we can find explicit solutions for x through the quadratic
formula,
[13] x1 = ((a + d) + sqrt((a+d)^2 - 4(ad - bc)) ) / 2
[14] x2 = ((a + d) - sqrt((a+d)^2 - 4(ad - bc)) ) / 2
Thus, the explicit formula for the matrix cosine of a 2x2 matrix
becomes
[15] cos [a b] = [u1 u2]
[c d] [u3 u4]
where
u1 = (cos(x2).a-cos(x1).a+x2.cos(x1)-x1.cos(x2))/(x2-x1)
u2 = b (cos(x1) - cos(x2) ) / (x1 - x2)
u3 = c (cos (x1 - cos(x2) ) / (x1 - x2)
u4 = (cos(x2) d - cos(x1) d + x2 cos(x1) - x1 cos(x2) ) / (x2-x1)
x1 = ((a + d) + sqrt((a+d)^2 - 4(ad - bc)) ) / 2
x2 = ((a + d) - sqrt((a+d)^2 - 4(ad - bc)) ) / 2
For an NxN matrix B, the matrix cosine of B can be similarly solved for
in terms of the N eigenvalues of B. The eigenvalues themselves will
need to be evaluted through numerical methods since, generally, there
is no solution to radicals of N-degree polynomials (Abel's theorem).
.
|
|
| User: "" |
|
| Title: Re: The cosine of a matrix |
25 Oct 2006 07:25:06 AM |
|
|
wrote:
In this article we shall derive an explicit formula for the cosine of a
matrix.
Consider the cosine function. It is true that the cosine function can
be defined by its Maclaurin series expansion of the form,
[1] cos x = SUM(n=0)^INF (-1)^n x^(2n) / (2n)!
By simply substituting x with some arbitrary square matrix A, we can
similary define cosine of a A as:
[2] cos A = SUM(n=0)^INF (-1)^n A^(2n) / (2n)!
It is true that such a substitution is valid since taking the natural
powers of square matrices always exist.
But, for [2] to be of some utility we need to know if it converges for
arbitrary A. It turns out that for all A, cos A converges thus it is
well-defined.
In the case of a 2x2 matrix, the matrix cosine becomes
[3] cos A = cos[a b]
[c d]
If we naively expand [3] using [2] we will not get a formula which
lends itself easily to computation.
We need to find a better solution.
It is known from the Cayley-Hamilton theorem that every function of an
NxN matrix can be written as a (matrix) polynomial of degree (N-1).
In the case of [3] we can say
[4] cos A = k1 A + k0 I
where k1,k0 are two scalars and I the 2x2 identity matrix.
In component form, [4] evaluates to
[5] cos A = [a.k1+k0 k1 ]
[c.k1 d.k1+k0]
Misprint: A_12 = k1 (not k0)
If we solve for the constants k1, k0, we have an explicit formula at
least for a 2x2 matrix).
Now, it is also true from the Cayley-Hamilton theorem that
[6] cos(x) = k1 x + k0
for all eigenvalues x of A.
Since A is a 2x2 matrix, cos(A) is a 2x2 matrix. Since all 2x2 matrices
have 2 eigenvalues x1,x2, [5] becomes two simulanteous linear
equations,
[7] cos(x1) = k1 x1 + k0
[8] cos(x2) = k1 x2 + k0
Converting into matrix form,
[8.1] [ cos(x1) ] = [x1 1] [k1]
[ cos(x2) ] [x2 1] [k0]
Solving for k1 and k0 through Gauss-Jordan elimination (or Cramers
rule) gives,
[9] k1 = (cos(x1) - cos(x2)) / (x1 - x2)
[10] k0 = (x2 cos(x1) - x1 cos(x2)) / (x2 - x1)
Subsitution of [9] and [10] into [5] gives
[11] cos [a b] = [u1 u2]
[c d] [u3 u4]
where
u1 = (cos(x2).a-cos(x1).a+x2.cos(x1)-x1.cos(x2))/(x2-x1)
u2 = b (cos(x1) - cos(x2) ) / (x1 - x2)
u3 = c (cos (x1 - cos(x2) ) / (x1 - x2)
u4 = (cos(x2) d - cos(x1) d + x2 cos(x1) - x1 cos(x2) ) / (x2-x1)
Which gives us an solution to the matrix cosine of A in terms of the
eigenvalues of A.
We said before that a 2x2 matrix has 2 eigenvalues, and this is true
because the characteristic polynomial of A expands as a quadratic
equation. That is,
[12] 0 = det (A - xI) = det |a-x b| = (a-x)(d-x) - bc
|c d-x|
Luckily, we can find explicit solutions for x through the quadratic
formula,
[13] x1 = ((a + d) + sqrt((a+d)^2 - 4(ad - bc)) ) / 2
[14] x2 = ((a + d) - sqrt((a+d)^2 - 4(ad - bc)) ) / 2
Thus, the explicit formula for the matrix cosine of a 2x2 matrix
becomes
[15] cos [a b] = [u1 u2]
[c d] [u3 u4]
where
u1 = (cos(x2).a-cos(x1).a+x2.cos(x1)-x1.cos(x2))/(x2-x1)
u2 = b (cos(x1) - cos(x2) ) / (x1 - x2)
u3 = c (cos (x1 - cos(x2) ) / (x1 - x2)
u4 = (cos(x2) d - cos(x1) d + x2 cos(x1) - x1 cos(x2) ) / (x2-x1)
x1 = ((a + d) + sqrt((a+d)^2 - 4(ad - bc)) ) / 2
x2 = ((a + d) - sqrt((a+d)^2 - 4(ad - bc)) ) / 2
For an NxN matrix B, the matrix cosine of B can be similarly solved for
in terms of the N eigenvalues of B. The eigenvalues themselves will
need to be evaluted through numerical methods since, generally, there
is no solution to radicals of N-degree polynomials (Abel's theorem).
NOTE: The presented derivation assumes that the parameter matrix A has
distinct eigenvalues. In general, this is not the case. For matrices
with eigenvalues having multiplicty greater that 1, step [8] must be
replaced with the derivative of [7], giving new linear equations,
[7] cos(x1) = k1 x1 + k0
[8] -sin(x2) = k1 { note: x1==x2 }
The remaining steps give the matrix cosine,
cos (A) = [u1, u2]
[u3, u4]
where
u1 = cos(x) - (x-a)sin(x)
u2 = -b sin(x)
u3 = -c sin(x)
u4 = cos(x) - (x-d)sin(x)
x = ((a + d) +/- sqrt((a+d)^2 - 4(ad - bc)) ) / 2
In the N-dimensional case, if the subset of eigenvalues C=[x_i,
x_(i+1), x_(i+2),...] are all non-distinct then for 0 < j < |C|,
replace the linear equation for the (i+j)'th eigenvalue with the j'th
derivative of the linear equation for x_i.
.
|
|
|
|
| User: "" |
|
| Title: Re: The cosine of a matrix |
24 Oct 2006 10:20:53 AM |
|
|
wrote:
In this article we shall derive an explicit formula for the cosine of a
matrix.
All if this is old hat and well-known; see, eg., Gantmacher, or
Lancaster.
I have a related question, though: is it true that for a matrix A we
have
(sin(A))^2 + (cos(A))^2 = I? (I = identity matrix)
R.G. Vickson
Consider the cosine function. It is true that the cosine function can
be defined by its Maclaurin series expansion of the form,
[1] cos x = SUM(n=0)^INF (-1)^n x^(2n) / (2n)!
By simply substituting x with some arbitrary square matrix A, we can
similary define cosine of a A as:
[2] cos A = SUM(n=0)^INF (-1)^n A^(2n) / (2n)!
It is true that such a substitution is valid since taking the natural
powers of square matrices always exist.
But, for [2] to be of some utility we need to know if it converges for
arbitrary A. It turns out that for all A, cos A converges thus it is
well-defined.
In the case of a 2x2 matrix, the matrix cosine becomes
[3] cos A = cos[a b]
[c d]
If we naively expand [3] using [2] we will not get a formula which
lends itself easily to computation.
We need to find a better solution.
It is known from the Cayley-Hamilton theorem that every function of an
NxN matrix can be written as a (matrix) polynomial of degree (N-1).
In the case of [3] we can say
[4] cos A = k1 A + k0 I
where k1,k0 are two scalars and I the 2x2 identity matrix.
In component form, [4] evaluates to
[5] cos A = [a.k1+k0 k0 ]
[c.k1 d.k1+k0]
If we solve for the constants k1, k0, we have an explicit formula at
least for a 2x2 matrix).
Now, it is also true from the Cayley-Hamilton theorem that
[6] cos(x) = k1 x + k0
for all eigenvalues x of A.
Since A is a 2x2 matrix, cos(A) is a 2x2 matrix. Since all 2x2 matrices
have 2 eigenvalues x1,x2, [5] becomes two simulanteous linear
equations,
[7] cos(x1) = k1 x1 + k0
[8] cos(x2) = k1 x2 + k0
Converting into matrix form,
[8.1] [ cos(x1) ] = [x1 1] [k1]
[ cos(x2) ] [x2 1] [k0]
Solving for k1 and k0 through Gauss-Jordan elimination (or Cramers
rule) gives,
[9] k1 = (cos(x1) - cos(x2)) / (x1 - x2)
[10] k0 = (x2 cos(x1) - x1 cos(x2)) / (x2 - x1)
Subsitution of [9] and [10] into [5] gives
[11] cos [a b] = [u1 u2]
[c d] [u3 u4]
where
u1 = (cos(x2).a-cos(x1).a+x2.cos(x1)-x1.cos(x2))/(x2-x1)
u2 = b (cos(x1) - cos(x2) ) / (x1 - x2)
u3 = c (cos (x1 - cos(x2) ) / (x1 - x2)
u4 = (cos(x2) d - cos(x1) d + x2 cos(x1) - x1 cos(x2) ) / (x2-x1)
Which gives us an solution to the matrix cosine of A in terms of the
eigenvalues of A.
We said before that a 2x2 matrix has 2 eigenvalues, and this is true
because the characteristic polynomial of A expands as a quadratic
equation. That is,
[12] 0 = det (A - xI) = det |a-x b| = (a-x)(d-x) - bc
|c d-x|
Luckily, we can find explicit solutions for x through the quadratic
formula,
[13] x1 = ((a + d) + sqrt((a+d)^2 - 4(ad - bc)) ) / 2
[14] x2 = ((a + d) - sqrt((a+d)^2 - 4(ad - bc)) ) / 2
Thus, the explicit formula for the matrix cosine of a 2x2 matrix
becomes
[15] cos [a b] = [u1 u2]
[c d] [u3 u4]
where
u1 = (cos(x2).a-cos(x1).a+x2.cos(x1)-x1.cos(x2))/(x2-x1)
u2 = b (cos(x1) - cos(x2) ) / (x1 - x2)
u3 = c (cos (x1 - cos(x2) ) / (x1 - x2)
u4 = (cos(x2) d - cos(x1) d + x2 cos(x1) - x1 cos(x2) ) / (x2-x1)
x1 = ((a + d) + sqrt((a+d)^2 - 4(ad - bc)) ) / 2
x2 = ((a + d) - sqrt((a+d)^2 - 4(ad - bc)) ) / 2
For an NxN matrix B, the matrix cosine of B can be similarly solved for
in terms of the N eigenvalues of B. The eigenvalues themselves will
need to be evaluted through numerical methods since, generally, there
is no solution to radicals of N-degree polynomials (Abel's theorem).
.
|
|
|
| User: "Gene Ward Smith" |
|
| Title: Re: The cosine of a matrix |
24 Oct 2006 01:00:19 PM |
|
|
wrote:
All if this is old hat and well-known; see, eg., Gantmacher, or
Lancaster.
Or if you really want to have fun, generalize the question and study
spectral theory.
.
|
|
|
| User: "Bill Hobba" |
|
| Title: Re: The cosine of a matrix |
24 Oct 2006 06:37:59 PM |
|
|
"Gene Ward Smith" <genewardsmith@gmail.com> wrote in message
news:1161712819.262599.112930@k70g2000cwa.googlegroups.com...
C6L1V@shaw.ca wrote:
All if this is old hat and well-known; see, eg., Gantmacher, or
Lancaster.
Or if you really want to have fun, generalize the question and study
spectral theory.
And for an interesting application see Von Neumann - Mathematical
Foundations of Quantum Theory. A classic but a goody. Not recommended for
learning Quantum Theory but mathematically more elegant to those so inclined
than the usual treatment in physics texts that, even though they call it a
Hibert space, in reality it isn't. Lots of fun learning distribution theory
and figuring out how Von Neumann's presentation based on an operators
spectrum, resolutions of the identity etc, can be linked to the way
physicists usually do it with distributions like the Dirac delta function.
Thanks
Bill
.
|
|
|
|
|
| User: "" |
|
| Title: Re: The cosine of a matrix |
25 Oct 2006 07:45:31 AM |
|
|
wrote:
schoenfeld.one@gmail.com wrote:
In this article we shall derive an explicit formula for the cosine of a
matrix.
All if this is old hat and well-known; see, eg., Gantmacher, or
Lancaster.
I am not claiming priorioty on this stuff, I am merely solving and
posting a linear algebra problem for which I have not found a solution
for in any of my textss
I have a related question, though: is it true that for a matrix A we
have
(sin(A))^2 + (cos(A))^2 = I? (I = identity matrix)
Yes it is true, as other posters have shown. If you really wanted to
you could derive explicit formula(s) using the same steps for the
matrix sine and then compare it with I - cos(A)^2. A general solution
needs to account for eigenvalue multiplicty (which is not so hard, see
followup post).
R.G. Vickson
[...]
.
|
|
|
|
| User: "Robert Israel" |
|
| Title: Re: The cosine of a matrix |
24 Oct 2006 12:06:57 PM |
|
|
In article <1161703253.074796.158610@k70g2000cwa.googlegroups.com>,
C6L1V@shaw.ca <C6L1V@shaw.ca> wrote:
schoenfeld.one@gmail.com wrote:
In this article we shall derive an explicit formula for the cosine of a
matrix.
All if this is old hat and well-known; see, eg., Gantmacher, or
Lancaster.
I have a related question, though: is it true that for a matrix A we
have
(sin(A))^2 + (cos(A))^2 = I? (I = identity matrix)
More generally, for any bounded linear operator A on a complex Banach space
X, the holomorphic functional calculus is an algebra homorphism f -> f(A)
from H(G), the analytic functions on a neighbourhood G of the spectrum of A,
into B(X), the bounded linear operators on X. So any polynomial identity
P(f_1, ..., f_n) = 0, where f_1,...,f_n are in H(G), implies
P(f_1(A), ..., f_n(A)) = 0.
Robert Israel
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada
.
|
|
|
|
|

|
Related Articles |
|
|