Accuracy of poly for random unitary matrices
1 view (last 30 days)
Show older comments
I have been trying to do some computations with the characteristic polynomials of random unitary matrices, and I have come across some unusual behavior of the poly command.
Let's say that we generate a random complex unitary matrix and compute the coefficients of it's characteristic polynomial:
n=400;
[Q,R]=qr((randn(n)+1j*randn(n))/sqrt(2));
U=Q*diag(diag(R)./abs(diag(R)));
p=poly(U);
plot(abs(p),'o');
Now, I believe that the polynomial coefficients should all be relatively close to one. However, the coefficients have magnitudes around 10^63 in some cases. This seems to be a problem for large n.
Now my question is if Matlab should compute the coefficients more accurately than it does? I would think that this problem is a relatively well conditioned one: recover the characteristic polynomial of a unitary matrix.
2 Comments
John D'Errico
on 18 Jun 2014
You should not be surprised at this. Floating point arithmetic is NOT mathematics, although there are some occasional overlaps.
Answers (1)
See Also
Categories
Find more on Polynomials in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!