Question: are the rows of x linearly independent?
Answer: Conversely, if your matrix is non-singular, it's rows (and columns) are linearly independent. Matrices only have inverses when they are square. ... This means that if you want both your rows and your columns to be linearly independent, there must be an equal number of rows and columns (i.e. a square matrix).