So, I have just finished implementing the practical QR algorithm for finding eigenvalues of a symmetric real-valued matrix and it seems to work great! I am currently testing my function and was thinking about testing it for symmetric orthogonal matrices. How can I construct such a matrix in MATLAB? I was able to construct a random symmetric matrix by using A = randn(10,10); symmetric = (A + A')/2 .
Consider the matrix,
where $v$ is a unit vector which is clearly symmetrical.
This is known as Householder reflection.