How do I create a Toeplitz matrix like the following in LaTeX?

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[ %\arraycolsep=4pt
G =
\begin{bmatrix*}[r]
1 \\
2&1\\
-1&2&1\\
&-1&2&1\\
&&-1&2&1\\
&&&-1&2&1\\
&&&&&&\ddots\\
&&&&&&&\ddots\\
&&&&&&&&\ddots\\
&&&&&&&&&1
\end{bmatrix*}
\]
\end{document}

-1 2 1
Here you go:
\documentclass{article}
\pagestyle{empty}% for cropping
\usepackage{amsmath}
\begin{document}
\begin{equation*}
G =
\begin{bmatrix}
1 \cr
2&1\cr
-1&2&1\cr
&-1&2&1\cr
&&-1&2&1\cr
&&&-1&2&1\cr
&&&&&&\ddots\cr
&&&&&&&\ddots\cr
&&&&&&&&\ddots\cr
&&&&&&&&&1\cr
\end{bmatrix}
\end{equation*}
\end{document}
To get nicer alignment of the minus-signs you could use an array with right-aligned columns
\documentclass{article}
\pagestyle{empty}% for cropping
\usepackage{amsmath}
\begin{document}
\begin{equation*}
G =
\left[
\begin{array}{*{10}r}
1 \cr
2&1\cr
-1&2&1\cr
&-1&2&1\cr
&&-1&2&1\cr
&&&-1&2&1\cr
&&&&&&\ddots\cr
&&&&&&&\ddots\cr
&&&&&&&&\ddots\cr
&&&&&&&&&1\cr
\end{array}
\right]
\end{equation*}
\end{document}
mathtools package and write: begin{bmatrix*}[r] … \end{bmatrix*}.
\cr instead of `\`?
\\. In this case both are equivalent. Also \cr is primitive, hence it doesn't need to get expanded, you may save half a nano-second by that.
Although late to the race my entry is presented below:
\documentclass[12pt]{article}
\usepackage{mathtools}
\usepackage{amssymb}
\begin {document}
\begin{equation}
\begin{pmatrix}
2 & -1 & 0 & \cdots & \cdots & \cdots & \cdots & 0\\
-1 & 2 & -1 & 0 & & & & \vdots\\
0 & -1 & 2 & -1 & \ddots & & & \vdots\\
\vdots & 0 & \ddots & \ddots & \ddots & \ddots & & \vdots\\
\vdots & & \ddots & \ddots & \ddots & \ddots & 0 & \vdots\\
\vdots & & & \ddots & -1 & 2 & -1 & 0\\
\vdots & & & & 0 & -1 & 2 & -1\\
0 & \cdots & \cdots & \cdots & \cdots & 0 & -1 & 2\\
\end{pmatrix}
\end{equation}
\end{document}

With {bNiceMatrix} of nicematrix. You need several compilations.
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\[\renewcommand{\arraystretch}{1.3}
\setlength{\arraycolsep}{4pt}
\begin{bNiceMatrix}[columns-width=auto,xdots/shorten=6pt]
1 \\
2 & 1 \\
-1 & 2 & 1 \\
& -1 & 2 & 1 \\
& & -1 & 2 & 1 \\
& & & \Ddots[shorten-end=0pt] & \Ddots & \Ddots[draw-first] \\
\\
\\
& & & & & & -1 & 2 & 1 \\
\end{bNiceMatrix}
\]
\end{document}