title: How can I make a symmetric tridiagonal matrix (Wilkinson matrix) in R and compute the eigenvalues?
body: <blockquote>
  <p>In linear algebra, Wilkinson matrices are symmetric, tridiagonal,
  order-N matrices with pairs of nearly, but not exactly, equal
  eigenvalues. Wilkinson matrices have applications in many fields, including scientific computing, numerical linear algebra, and signal processing.(<a href="https://en.wikipedia.org/wiki/Wilkinson_matrix" rel="nofollow noreferrer">Wikipedia</a>)</p>
  </blockquote>
  <p>Following the matrix example from wikipedia, I have this matrix:</p>
  <pre><code>     [,1] [,2] [,3] [,4] [,5] [,6] [,7]
  [1,]    3    1    0    0    0    0    0
  [2,]    1    2    1    0    0    0    0
  [3,]    0    1    1    1    0    0    0
  [4,]    0    0    1    0    1    0    0
  [5,]    0    0    0    1    1    1    0
  [6,]    0    0    0    0    1    2    1
  [7,]    0    0    0    0    0    1    3
  </code></pre>
  <p>How can I create this matrix and compute the eigenvalues in R?</p>