The number of solutions is intimately related to the determinant of the corresponding matrix.
The determinant of your first system is:
And this equals
When the determinant is NOT equal to zero, you'll have a unique solution. So gives a unique solution.
When m equals 4, then we must consider values of k. m = 4 makes the system:
, which might be easier to analyse without matrices. If k is not 2, then there is no solution. If k = 2, there are infinite solutions.