# Generating Gauss-Seidel hard system

I am writing various Gauss-Seidel algorithm parallel implementations using different programming techniques for my assignment.

I have created a MATLAB script for generating strictly diagonally dominant matrices with different degree of diagonal dominance and sparseness for testing my implementations.

Problem is that I can't find a way to generate matrix that requires more than 15 iterations to converge (epsilon is set to 0.0001).

Is there a property that makes a system GS-hard?

-
Probably you should consider asking this on SciComp. However, I would probably suggest looking at spectral properties including Condition Numbers. – Inquest Mar 17 '12 at 20:04
If you mention the Hilbert matrix, people will think that you know what you are talking about. – marty cohen Mar 18 '12 at 4:54

## 1 Answer

A matrix with a high condition number will do the trick. One way to construct such a matrix is to create a diagonal matrix with a huge first entry and a tiny last entry and multiply it from both sides by random orthonormal matrices. The latter you can get by doing a QR decomposition of a random matrix.

-
In a pinch, QR decomposing a random matrix to generate a random orthogonal matrix works. There are more efficient methods (and equivalent), though... – J. M. Mar 19 '12 at 17:04