If our space is $\mathbb{R}^{n \times n}$, then can we definitely conclude that
$n \times n$ invertible matrices belong to its subspace
the set of all $n\times n$ matrices of the form $k*\mathcal{I}$, where $\mathcal{I}$ is the identity matrix, and $k$ is any real number also belongs to its subspace.
What kind of example can I give to show the following?
- the set of matrices similar to $A$ are not necessarily subspaces of $\mathbb{R}^{n\times n}$. We're assuming that $A$ is a fixed matrix
- the set of all matrices that commute with $A$ do not fall into the subspace of $\mathbb{R}^{n\times n}$. We're assuming that $A$ is a fixed matrix as well.
Are these assumptions correct?
Let's start by the definition
Let us see now if the sets that you gave us are indeed subspaces o $\mathbb{R}^{n\times n}$:
$n\times n$ matrices of the form $k\mathcal{I}$: this indeed is a subspace because it has the zero vector (just set $k=0$) and is closed under addition $$k\mathcal{I}+w\mathcal{I}= (k+w)\mathcal{I} = n\mathcal{I}$$ and it's closed under scalar multiplication which is clear even from the definition $k\mathcal{I}$
All matrices similar to a matrix $A$: this is trickier because clearly if $A$ is the null matrix than all the matrix similar to $A$ is just the zero matrix. In this case this is a subspace because it has zero matrix, adding zero matrices together get's you zero matrices, and multiplying by a scalar the zero matrix gives the zero matrix. In all other cases this is not a subspace because of the lack of zero vector.
All matrices that commute with $A$: if two matrices commute then $$[A,B]= AB-BA = 0$$ let's see if this is a subspace: the zero matrix commutes with every matrix, in fact $$[A,0] = A0-0A = 0-0=0$$ For every matrix $B$ that commute with $A$, the matrix $kB$ $$[A, kB] = AkB-kBA = kAB-kBA = k[A,B] = 0$$ commutes as well with $A$. If two matrices $B$ and $C$ commutes with $A$, then $$\begin{align}&[A,B+C] = A(B+C)-(B+C)A = \\ &AB + AC - BA - CA = \\ &(AB-BA)+(AC-CA) = \\ &[A,B]+[A,C] = 0+0=0\end{align}$$ their sum commute. So this is a subspace.