Using centred difference formula to approximate differential equation 

(Paper and pencil problem): Let $y_i=y(t_i)$ and $f_i=f(t_i)$, and show that by using the centered difference formula for $y^{\prime\prime}(t)$, we can compute approximations to $y_i$ by solving the linear system $Ty=h^2f$ where $$T=\left[\begin{array}{cccc}2 & -1 & & 0 \\ -1 & \ddots & \ddots & \\ & \ddots & \ddots & -1 \\ 0 & &-1 & 2 \end{array}\right]$$ with $$y=\left[\begin{array}{c}y_1 \\ y_2 \\ \vdots \\ y_n \end{array}\right]\;\; , \; \; f=\left[\begin{array}{c}f_1 \\ f_2 \\ \vdots \\ f_n \end{array}\right].$$  To do this try $n=5$.  If you do it for $n=5$, it should be obvious that it generalizes to larger values of $n$.


I am having issues starting this problem which can be found here.
I have worked out that timesing out by the $h^2$ is where that comes from but I don't really understand it theoretically. I'm not sure where the matrix comes from. I have tried asking flatmate and she wasn't sure but she suggested timesing the $T$ with the Y to get a matrix which could be seen as equations.

Let $y$ be defined on a closed interval $[a, b]$ and $t_0 = a$, $t_1 = a + h$, $\cdots$, $t_n = a + nh = b$ for sufficiently small $h \neq 0$. Then its first and second derivative at $t = t_i$ for $1 < i < n$ are approximately
$$\begin{align*}
y'(t_i) &= \frac{y'(t_{i - 1} + h) - y'(t_{i - 1})}{h}, \\
y''(t_i) &= \frac{y'(t_{i - 1} + h) - y'(t_{i - 1})}{h} \\
&= \frac{y(t_{i - 1} + 2h) - 2y(t_{i - 1} + h) + y(t_{i - 1})}{h^2} \\
&= \frac{y(t_{i + 1}) - 2y(t_i) + y(t_{i - 1})}{h^2}. 
\end{align*}$$
This is where $h^2$ and $T$ come from.
