In $Ax=b$. If $A$ is not invertible there are no solutions or infinity. How to determine what the case is? I learnt that for the equation:
$Ax=b$ 
There is one solution if $A$ is invertible.
But if $A$ is singular there are infinity solutions or no solutions at all.
If $A$ is singular is it possible to determine whether there are no solutions or infinity solutions?  
 A: Yes, the general theory says that the solutions exist iff
$$
rk(A)=rk(\bar{A}),
$$
where $\bar{A}$ is the matrix with the additional column $b$ appended to it (it is called the augmented matrix).
A: Yes, to examine the size of the solution set of a system of linear equations, we look at the rank of the coefficient matrix compared with the rank of the augmented matrix. 
Let $A$ be the coefficient matrix of a system of linear equations in $n$ unknowns and $\mathbf{b}$ be the vector of constants. If $\text{rank}(A|\mathbf{b}) = \text{rank}(A) = n$ then we have a single unique solution. If you put a square matrix into reduced row-echelon form and it has rank $n$ then the reduced row-echelon form of that matrix is $\mathbb{I}_n$ the identity matrix, which is equivalent to having a unique solution to the system.
If $\text{rank}(A|\mathbf{b}) = \text{rank}(A) < n$ then there are infinitely many solutions to the system. In this case, we see that the row-echelon form of the matrix has a row of zeroes at the bottom and this means that at least one of the variables is a $\textit{free variable}$.
If $\text{rank}(A|\mathbf{b}) > \text{rank}(A)$ then there are no solutions. This is easy to see, since there will be a row of zeroes in the row echelon form of $A$ but a row of the form $[0\ 0 \ 0 \cdot\cdot\cdot\ c]$ in $(A|\mathbf{b})$ with $c \neq 0$, which corresponds to a linear equation of the form 
$$0a_1 + 0a_2 + 0a_3 + \dots + 0a_n = c$$
which, of course, is nonsense.
A: A simple and fast answer is that if $b$ is in the space spanned by the column of $A$, there will be infinite solutions. Otherwise, there is no solution.
A: Your question's title isn't logical, but see Proposition 3.38 in Kuldeep Singh's Linear Algebra: Step by Step
(2013) on p. 265.  Typo is "Exercises 3.6" that ought "Exercise 3.6.14" on p 268.

