Is there any way to test the existence of left or right inverse matrix? I know that the inverse matrix of a square matrix exists iff its determinant isn't 0.

What about a non-square matrix?
Is there any theorem about the existence of a left- or right-inverse matrix of a non-square matrix?
It seems there does not exist a determinant of a non-square matrix as Determinant of a non-square matrix
If $A$ is a $m \times n$ and $rg(A) = n$, $A$ has a left inverse matrix $B$ which is a $n \times m$ matrix, thus $BA = I_n$.

If $rg(A) = m$, then $A$ has a right inverse matrix $B$, a $n \times m$ matrix. Thus $AB = I_m$.
https://math.berkeley.edu/~shinms/SP14-54/left-right-invertible-matrices.pdf
Let m, n be two positive integers.
(1) Suppose m &lt; n (more columns than rows).
(i) There are no left invertible m × n matrices.
(ii) An m × n matrix is right invertible if and only if its REF has pivots
in every row.3
(2) Suppose m > n (more rows than columns).
(i) There are no right invertible m × n matrices.
(ii) An m × n matrix is left invertible if and only if its REF has pivots in
every column.4

Hope this helps