For my Fractional Calculus course, I was asked to find a matrix that arbitrarily represents the second derivative. This eventually got me a tridiagonal matrix. I was letter asked to find the eigenvectors of a $n\times n$ tridiagonal matrix. In this case I did a $30 \times 30$ tridiagonal matrix. Afterwards we were asked to plot each eigenvectors to notice the behavior of the sinusoidal function as $n \rightarrow \infty$.

Mathematically the oscillation is suppose to increase as $n$ increases. We see the graph below confirms this, but it is hard to tell with all the points all over the place.

Anywho, once I got my list of eigenvectors, I plot the list of eigenvectors and I get the following image I was referring to earlier: enter image description here

Without having to do them one at a time, is there a way to plot each of these eigenvectors on their own graph? Is there a way to change the scaling from $1$ to $\frac{1}{30}$ (or in general \frac{1}{n})? I just wanted to change the spacing between the points since our professor wanted us to graph our vectors on the interval [0,1].

Below is a small sample of my code

n = 30;
A = Total[{DiagonalMatrix[Array[-1 &, n - 1], -1], 
DiagonalMatrix[Array[2 &, n]], 
DiagonalMatrix[Array[-1 &, n - 1], 1]}] // MatrixForm


Eigenvectors[A] //N


I know I skipped some details related to the assignment itself but I don't think they are needed for what I am asking for; however, if you are curious of what the assignment is, or think it will be helpful clarify a few things, let me know.

Thank You for your time. I appreciate any feedback or suggestions you may have. Have a wonderful day.

  • 3
    $\begingroup$ A little bit of code would be nice, actually. But probably you could do ListPlot[#] & /@ Eigenvectors[mat]. $\endgroup$
    – march
    Commented Sep 22, 2015 at 22:24
  • 1
    $\begingroup$ Try ListPlot[ yourList , Joined->True] to see a solid curve for the oscillations. Changing the scaling on the x-axis visually will not really do anything. It will change the maximal x-axis number you see from 30 to 1, but the spacing ratio between points will still stay the same. $\endgroup$
    – Kagaratsch
    Commented Sep 22, 2015 at 22:28

1 Answer 1


It sounds like you want one of these:

ListLinePlot[#, ImageSize -> 4*72, PlotRange -> {-5,5}]& /@ Eigenvectors[mat]


  {eigs = Eigenvectors[mat]},
    ListLinePlot[mat[[k]], ImageSize -> 4*72, PlotRange -> {-5,5}],
    {{k, 1}, 1, Length[eigs], 1}]]

which will let you look at them one at a time.

In the case of the first code block, you can organize the plots using a GraphicsGrid, GraphicsRow, or GraphicsColumn:

  {plots = Map[
     ListLinePlot[#, ImageSize -> 4*72, PlotRange -> {-5,5}]&,
  GraphicsColumn[plots, ImageSize -> 4*72]]

Finally, if you want to just see them all at once on one graph, you can just do this:

  • $\begingroup$ Re: the scaling, I'm not sure what you mean, but you might look at the AspectRatio option? $\endgroup$
    – nben
    Commented Sep 23, 2015 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.