Having matrices $A$ and $T$, find $S$ such that $A=ST$. But what if $\det T=0$? We have as a known data matrices $A$,$T$.
We want to find $S$ that $A=ST$.
What I would do is multiply $T^{-1}$ from right side.
$AT^{-1}=S$
And here we have $S$, but what if $det(T)=0$ so matrix $T^{-1}$ does not exists.
Does it implify that searched $S$ also does not exists?
 A: The matrix $S$ may exist, but it is also possible that it doesn't exist. If, for instance, $\det A\neq0$, then, since $\det T=0$, you can be sure that it doesn't exist.
A: Suppose $S$ exists and we're dealing with square matrices. Then if $Tv=0$, we also have $Av=0$.
Since the null space of $T$ is contained in the null space of $A$, the rank-nullity theorem tells us that the rank of $T$ is greater than or equal than the rank of $A$.
Thus $S$ cannot exist if the rank of $A$ is greater than the rank of $T$.
Actually, the matrix $S$ exists if and only if the null space of $T$ is contained in the null space of $A$. It's perhaps simpler to show it with linear maps.
We have linear maps $f\colon V\to V$ and $g\colon V\to V$ (with $V$ a finite dimensional space) such that $\ker g\subseteq\ker f$. We want to find $h\colon V\to V$ such that $f=h\circ g$.
Take a basis $\{v_1,\dots,v_k\}$ of $\ker g$ and extend it to a basis of $V$. Then it's easy to show that $\{w_{k+1}=g(v_{k+1}),\dots,w_n=g(v_{n})\}$ is linearly independent, so we can extend it to a basis $\{w_1,\dots,w_k,w_{k+1},\dots,w_n\}$ of $V$.
Now define $h$ on this basis by
$$
h(w_i)=\begin{cases}
0 & 1\le i\le k \\[4px]
f(v_i) & k+1\le i\le n
\end{cases}
$$
Since, for every $i$, we have $h(g(v_i))=f(v_i)$, we can conclude that $h\circ g=f$.
Now take for $f$ and $g$ the linear maps induced by $A$ and $T$ respectively: $f(v)=Av$ and $g(v)=Tv$; for $S$ use the matrix of $h$ with respect to the standard basis.
Of course the condition that the null space of $T$ is contained in the null space of $A$ is satisfied if $T$ is invertible.
