I have a question:
If a matrix is given to be invertible (it for example has infinitely many solutions), are you allowed to assume that the determinant of the matrix is not equal to 0?
I am not sure, but I think I once heard that you are never allowed to assume that the determinant of a matrix is 0, you always have to prove it through calculations, but I might be wrong..
Would greatly appreciate an answer :)
Determinants
A matrix is invertible if it has an inverse, right? That is, a matrix $A$ is invertible if there exists a matrix $A^{-1}$ such that $$ A\cdot A^{-1} = I_{n} = A^{-1}\cdot A. $$ Now, suppose the determinant of matrix $A$ is $\det(A) = a$. Then if $A^{-1}$ is the inverse of $A$, we have that $\det(A^{-1}) = a^{-1}$. This is because the determinant is multiplicative, so $$ \det(AB) = \det(A)\det(B) $$ and the determinant of $I_{n}$ is $1$. To rephrase this, if $A^{-1}$ is the inverse of $A$ then $$ \det(A)\det(A^{-1}) = 1. $$ Now given this, if a matrix $A$ has determinant $0$, is there a matrix $A^{-1}$ such that $$ \det(A)\det(A^{-1}) = 1? $$ Clearly not since $0$ times anything is always $0$, so there is no $A^{-1}$ that satisfies the above.
Linear Maps
Another perspective is to think matrices as linear maps. If you've not seen matrices expressed this way, observe the following example. Let $f : \mathbb{R}^{2} \to \mathbb{R}^{3}$ be defined by $$ f(x, y) = (x, y, x + y). $$ We can see this as $f$ sending the vector $(x, y)$ to the vector $(x, y, x + y)$. In matrix form we have $$ \begin{pmatrix} x \\ y \\ x + y \\\end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \\ 1 & 1 \\\end{pmatrix}\begin{pmatrix} x \\ y \\\end{pmatrix}. $$ The matrix multiplying $(x, y)$ is the matrix that corresponds to the linear map $f$. In the case of a square $n \times n$ matrix, this corresponds to a map from $\mathbb{R}^{n} \to \mathbb{R}^{n}$.
If the matrix corresponding to a linear map has determinant $0$, this is because the linear map itself is not invertible. Try to see this for yourself with some examples. Note that if $A$ is the matrix corresponding to a linear map $f$, then $A^{-1}$ is the matrix corresponding to the linear map $f^{-1}$.
Following amd's comment, this answer assumes that you're working with matrices whose entries are in $\mathbb{R}$.