A square matrix $A$ is called nilpotent if some power of $A$ is the zero matrix.
Namely, $A$ is nilpotent if there exists a positive integer $k$ such that $A^k=O$, where $O$ is the zero matrix.

Suppose that $A$ is a nilpotent matrix and let $B$ be an invertible matrix of the same size as $A$.
Is the matrix $B-A$ invertible? If so prove it. Otherwise, give a counterexample.

We claim that the matrix $B-A$ is not necessarily invertible.
Consider the matrix
\[A=\begin{bmatrix}
0 & -1 \\0& 0
\end{bmatrix}.\]
This matrix is nilpotent as we have
\[A^2=\begin{bmatrix}
0 & -1 \\0& 0
\end{bmatrix}
\begin{bmatrix}
0 & -1 \\0& 0
\end{bmatrix}
=
\begin{bmatrix}
0 & 0 \\0& 0
\end{bmatrix}.\]

Also consider the matrix
\[B=\begin{bmatrix}
1 & 0 \\1& 1
\end{bmatrix}.\]
Since the determinant of the matrix $B$ is $1$, it is invertible.

So the matrix $A$ and $B$ satisfy the assumption of the problem.
However the matrix
\[B-A=\begin{bmatrix}
1 & 1 \\1& 1
\end{bmatrix}\]
is not invertible as its determinant is $0$.
Hence we found a counterexample.

Related Question.

Here is another problem about a nilpotent matrix.

Problem.
Let $A$ be an $n\times n$ nilpotent matrix. Then prove that $I-A, I+A$ are both nonsingular matrices, where $I$ is the $n\times n$ identity matrix.

Is the Product of a Nilpotent Matrix and an Invertible Matrix Nilpotent?
A square matrix $A$ is called nilpotent if there exists a positive integer $k$ such that $A^k=O$, where $O$ is the zero matrix.
Show that
(a) If $A$ is a nilpotent $n \times n$ matrix and $B$ is an $n\times n$ matrix such that $AB=BA$. Show that the product $AB$ is […]

Every Diagonalizable Nilpotent Matrix is the Zero Matrix
Prove that if $A$ is a diagonalizable nilpotent matrix, then $A$ is the zero matrix $O$.
Definition (Nilpotent Matrix)
A square matrix $A$ is called nilpotent if there exists a positive integer $k$ such that $A^k=O$.
Proof.
Main Part
Since $A$ is […]

10 Examples of Subsets that Are Not Subspaces of Vector Spaces
Each of the following sets are not a subspace of the specified vector space. For each set, give a reason why it is not a subspace.
(1) \[S_1=\left \{\, \begin{bmatrix}
x_1 \\
x_2 \\
x_3
\end{bmatrix} \in \R^3 \quad \middle | \quad x_1\geq 0 \,\right \}\]
in […]

True or False. Every Diagonalizable Matrix is Invertible
Is every diagonalizable matrix invertible?
Solution.
The answer is No.
Counterexample
We give a counterexample. Consider the $2\times 2$ zero matrix.
The zero matrix is a diagonal matrix, and thus it is diagonalizable.
However, the zero matrix is not […]

Nilpotent Matrices and Non-Singularity of Such Matrices
Let $A$ be an $n \times n$ nilpotent matrix, that is, $A^m=O$ for some positive integer $m$, where $O$ is the $n \times n$ zero matrix.
Prove that $A$ is a singular matrix and also prove that $I-A, I+A$ are both nonsingular matrices, where $I$ is the $n\times n$ identity […]

Normal Nilpotent Matrix is Zero Matrix
A complex square ($n\times n$) matrix $A$ is called normal if
\[A^* A=A A^*,\]
where $A^*$ denotes the conjugate transpose of $A$, that is $A^*=\bar{A}^{\trans}$.
A matrix $A$ is said to be nilpotent if there exists a positive integer $k$ such that $A^k$ is the zero […]

Find Inverse Matrices Using Adjoint Matrices
Let $A$ be an $n\times n$ matrix.
The $(i, j)$ cofactor $C_{ij}$ of $A$ is defined to be
\[C_{ij}=(-1)^{ij}\det(M_{ij}),\]
where $M_{ij}$ is the $(i,j)$ minor matrix obtained from $A$ removing the $i$-th row and $j$-th column.
Then consider the $n\times n$ matrix […]

For Which Choices of $x$ is the Given Matrix Invertible?
Determine the values of $x$ so that the matrix
\[A=\begin{bmatrix}
1 & 1 & x \\
1 &x &x \\
x & x & x
\end{bmatrix}\]
is invertible.
For those values of $x$, find the inverse matrix $A^{-1}$.
Solution.
We use the fact that a matrix is invertible […]