rosser

Rosser matrix, a classic eigenvalue test matrix.

Category: Mathematics > Elementary Math

Syntax

R = rosser

Returns the fixed 8-by-8 symmetric Rosser matrix.

Description

The matrix was designed to be hard for eigenvalue algorithms. Its eigenvalues form tight clusters near 1000 and 1020, include a pair of equal size and opposite sign, and one that is very close to zero. Methods that are not careful with such clusters lose accuracy.

It has no parameters; calling it with or without parentheses gives the same matrix.

Output arguments

R
Symmetric 8-by-8 matrix of integers.

Example

The matrix and its spectrum

R = rosser();
R(1:3, 1:3)
issymmetric(R)
round(eig(R))'
Output
ans = 3×3

   611   196  -192
   196   899   113
  -192   113   899
ans = logical
   1
ans = 1×8

       -1020           0           0        1000        1000        1020        1020        1020

See also

eig hilb magic gallery issymmetric