How do I turn this Crank-Nicolson type equation into three vectors representing the middle, upper, and lower diagonals in a tridiagonal matrix? I have the following homework problem:

I have calculated the Crank-Nicolson equation to be 

Equation 1
  $$
-200.05u_{m-1}^{n+1}+400.9995u_{m}^{n+1}-199.95u_{m+1}^{n+1} = 199.95u_{m-1}^{n}-398.9995u_{m}^{n}+200.05u_{m+1}^{n}
$$

For the sake of simplicity, let's just call this equation:

Equation 2
  $$
-au_{m-1}^{n+1}+bu_{m}^{n+1}-cu_{m+1}^{n+1} = du_{m-1}^{n}-eu_{m}^{n}+fu_{m+1}^{n}
$$

The professor purposely chose such a large matrix so that we had to use his method to solve it.  The problem is that I've never done it this way and I'm really confused as to how to do it.
I have the equation, and if I had the tridiagonal matrix I would know how to finish the problem.  I just don't know how to generate the tridiagonal matrix.  In the question, my professor states that he wants me to use three vectors to represent the three diagonals in the matrix.  Also, I'm not really sure where the 1000x2 matrix comes into play.
So how would I use Equation 2 to generate the three vectors needed in the problem?
 A: You will have two matrices, one corresponding to the implicit terms, and the other corresponding to the explicit terms.  Let $\mathrm{A}$ denote the implicit one, $\mathrm{B}$ the explicit one, and let $\mathbf{U}^n = [u^n_0, u^n_2, ..., u^n_{M-1}]^T$.  Then
$$\mathrm{A}\mathbf{U}^{n+1} = \mathrm{B}\mathbf{U}^n.$$
To solve for $\mathbf{U}^{n+1}$, you will need some kind of linear solver; I presume you've covered these in your course.
Let $\mathbf{e}$ denote the vector of appropriate dimension of all ones, i.e., $[1,1,...,1]$.  Then $\mathrm{A}$ consists of diagonals $-c\mathbf{e}$, $b\mathbf{e}$, and $-a\mathbf{e}$, from upper to lower, respectively.  $\mathrm{B}$ consists of $f\mathbf{e}$, $-e\mathbf{e}$, and $d\mathbf{e}$, again from upper to lower diagonals respectively.  More explicitly:
$$ \mathrm{A} = 
        \begin{bmatrix}
        b & -c & \\
        -a & b & -c \\
         & -a & b & -c \\
         & & \ddots & \ddots & \ddots\\
         & & & -a & b & -c\\
         & & & & -a & b\\
        \end{bmatrix}
$$
$$ \mathrm{B} = 
        \begin{bmatrix}
         -e & f & \\
         d & -e & f \\
         & d & -e & f \\
         & & \ddots & \ddots & \ddots\\
         & & & d & -e & f\\
         & & & & d & -e\\
        \end{bmatrix}
$$
Now, these are just the general forms of $\mathrm{A}$ and $\mathrm{B}$; you will have to adjust them for the appropriate dimensions, once you've accounted for initial and boundary conditions.  Also, you may have to set certain entries for the boundary conditions.
Depending on which programming language you're using, there are different ways of generating these matrices.  In Matlab, for example, you could use the following, for a matrix with diagonals $x$, $y$, and $z$:
x = 1:4; y = 5:8; z = 9:12;
A = spdiags([x' y' z'],-1:1,4,4);
To check that $\mathrm{A}$ has the form you want, use the command full(A) to print the full matrix or spy(A) to look at the sparsity pattern.
