### Instruction: Find the matrix $\mathbf{M}$ such that
\[\mathbf{M} \mathbf{v} = -5 \mathbf{v}\]for all vectors $\mathbf{v}.$.### Response: To find the matrix $\mathbf{M}$, I need to find a linear transformation that scales every vector by a factor of -5.
A linear transformation can be represented by a matrix multiplication, so I need to find a matrix that has this property.
I can start by assuming that $\mathbf{M}$ is a square matrix of size $n \times n$, and see what conditions it must satisfy.
Let $\mathbf{e}_i$ be the standard basis vector of $\mathbb{R}^n$ that has a 1 in the $i$-th entry and 0 elsewhere.
Then, for any vector $\mathbf{v}$, I can write
\[\mathbf{v} = \sum_{i=1}^n v_i \mathbf{e}_i\]
where $v_i$ are the components of $\mathbf{v}$.
Now, I can apply the matrix multiplication to both sides of this equation and use the linearity property to get
\[\mathbf{M} \mathbf{v} = \mathbf{M} \sum_{i=1}^n v_i \mathbf{e}_i = \sum_{i=1}^n v_i \mathbf{M} \mathbf{e}_i\]
On the other hand, I also know that $\mathbf{M} \mathbf{v} = -5 \mathbf{v}$, so I can write
\[-5 \mathbf{v} = -5 \sum_{i=1}^n v_i \mathbf{e}_i = \sum_{i=1}^n (-5 v_i) \mathbf{e}_i\]
Comparing these two expressions, I can see that they must be equal for all $\mathbf{v}$, which means that
\[\mathbf{M} \mathbf{e}_i = -5 \mathbf{e}_i\]
for all $i = 1, 2, \dots, n$.
This tells me that the matrix $\mathbf{M}$ must have the property that its $i$-th column is equal to $-5$ times the $i$-th standard basis vector, or in other words,
\[M_{ji} = -5 \delta_{ji}\]
where $M_{ji}$ is the entry in the $j$-th row and $i$-th column of $\mathbf{M}$, and $\delta_{ji}$ is the Kronecker delta, which is 1 if $j=i$ and 0 otherwise.
This means that the matrix $\mathbf{M}$ is a diagonal matrix with $-5$ on the diagonal and 0 elsewhere, or in matrix notation,
\[\mathbf{M} = \begin{bmatrix}
-5 & 0 & \cdots & 0 \\
0 & -5 & \cdots & 0 \\
\vdots & \vdots & \ddots & \vdots \\
0 & 0 & \cdots & -5
\end{bmatrix}\]
This matrix satisfies the given condition for any vector $\mathbf{v}$ and any dimension $n$, so it is the general solution to the problem.