Matrix multiplication: is C(AB) the same as (CA)B? I would like to show that $(\mathbf{A} \mathbf{B})^{-1} = \mathbf{B}^{-1} \mathbf{A}^{-1}$, where $\mathbf{A}$ and $\mathbf{B}$ are $N \times N$ square matrices.
I think that this can be done as follows:
First, note that $(\mathbf{A}\mathbf{B})^{-1} (\mathbf{A} \mathbf{B}) = \mathbf{1}$ and also that $\mathbf{B}^{-1} \mathbf{A}^{-1} \mathbf{A} \mathbf{B} = \mathbf{B}^{-1} \mathbf{1} \mathbf{B} = \mathbf{B}^{-1} \mathbf{B} = \mathbf{1}$ (where $\mathbf{1}$ is the unit matrix). Thus
$(\mathbf{A} \mathbf{B})^{-1} \mathbf{A} \mathbf{B} = \mathbf{B}^{-1} \mathbf{A}^{-1} \mathbf{A} \mathbf{B}$
which implies that
$(\mathbf{A} \mathbf{B})^{-1} = \mathbf{B}^{-1} \mathbf{A}^{-1}$.
I am not sure that this is correct. It seems almost too easy! The correctness of my working is based on my assumption that $\mathbf{C} (\mathbf{A}\mathbf{B}) = (\mathbf{C} \mathbf{A}) \mathbf{B}$. Is this correct?
In normal linear algebra, this is the case. But is it the case in matrix multiplication? I am not sure whether the brackets result in a different order of multiplication and thus a different result.

As mentioned in the comments on my question, it is possible to demonstrate to yourself the property of associativity by switching to the index representation of matrices. I did this to verify to myself what was said above.
To show that $\mathbf{C}(\mathbf{A}\mathbf{B}) = (\mathbf{C} \mathbf{A}) \mathbf{B}$, note that
$ (\mathbf{C}(\mathbf{A}\mathbf{B}))_{ij} = \sum_{l} C_{il}(\mathbf{A}\mathbf{B})_{lj} = \sum_{l}\sum_{k} C_{il}A_{lk}B_{kj}$
and similarly
$ ((\mathbf{C}\mathbf{A})\mathbf{B})_{ij} = \sum_{l} (\mathbf{C}\mathbf{A})_{il} B_{lj} = \sum_{l}\sum_{k} C_{ik}A_{kl}B_{lj}$.
Both double summations can be seen to run over the same range of terms, and so we can see that the matrix elements $(\mathbf{C}(\mathbf{A}\mathbf{B}))_{ij}$ and $((\mathbf{C}\mathbf{A})\mathbf{B})_{ij}$ are the same and thus $\mathbf{C}(\mathbf{A}\mathbf{B}) = (\mathbf{C} \mathbf{A}) \mathbf{B}$.
