TITLE: Does the inverse of the matrix always rely on the determinant of a matrix?
QUESTION [14 upvotes]: I always thought that if the determinant of a matrix $A$ is $0$ then it has no inverse, $(A^{-1})$, until I saw an exercise in Contemporary Abstract Algebra by Gallian. This asks me to prove that the set of the $2\times2$ matrices of the form
$$\begin{bmatrix}
a&a\\
a&a\\
\end{bmatrix}\,,$$
where $a \neq 0$ and $a \in \mathbb R$.
is a group under matrix multiplication. The determinant of the above set of matrices is $0$, but still the inverse exists for each matrix which is nothing but
$$\begin{bmatrix}
\frac{a}{2} & \frac{a}{2} \\
\frac{a}{2} & \frac{a}{2} \\
\end{bmatrix}\,.$$
How is this possible? What makes these type of matrices escape from satisfying determinants? What's the logic behind that?

REPLY [5 votes]: The algebraic principle behind this is that the averaging operator $V(x,y) = (\frac{x+y}{2},\frac{x+y}{2})$ satisfies $V^2 = V$, making it a projection.
Hence for any scalars $a,b$ (or more generally matrices commuting with $V$) one has $(aV)(bV) = abV$.  Restricted to invertible $a$ and $b$, this is a group law on multiples of $V$.
The exercise is made trickier by the use of $2V$ rather than $V$ as basis element, so that the multiplication looks like $\frac{p}{2} \ast \frac{q}{2} = \frac{pq}{2}$.  
As a converse to this exercise, any situation where a collection of matrices (or elements of a ring) form a group requires the existence of a neutral element, $E$, that satisfies $E^2 = E$ so that there is always a projection involved.  It looks like the commutative groups of this form are always the product of $E$ by a group of elements that, modulo the kernel of $E$, are all invertible and all commute with $E$ and with each other.