How is that possible that matrices can be thought as coordinate systems? I've been reading around that matrices (for example, rotation matrices, but not only) can be thought somehow as coordinate systems. 

My question is: how is that possible? 

I've seen for example that if we're using row-major conventions, the rows of the matrices involved in the transformations (specifically I've seen about rotations) can be thought as the vectors representing some coordinate system (specifically it should be a local coordinate system).

Why is this the case? And why specifically a local coordinate system? What does it even mean local coordinate system in this context? Are there any other type of matrices, apart from the rotation matrices, which can be thought as coordinate systems? If yes, which ones, and why?

Matrices usually represent a transformation (linear or not, maybe also affine in computer graphics), but it's new to me to think about matrices as coordinate systems.
If you have a 3x3 matrix representing some transformation, you will actually have the X,Y,Z vectors of that transformation in the rows or columns (depending on if it's a row major or column major matrix).

In other words, if you have a 3x3, you can look at it and immediately get the up, right(*), forward vectors (asterisk due to handedness, it could be the left vector).



3x3 Details:

let's say you have a 3x3 matrix $M$:

$
M_{ij} =
\begin{bmatrix}
M_{1,1} &amp; M_{1,2} &amp; M_{1,3} \\
M_{2,1} &amp; M_{2,2} &amp; M_{2,3} \\
M_{3,1} &amp; M_{3,2} &amp; M_{3,3} \\
\end{bmatrix}
$

Let's see what happens when you multiply that by a vector $\begin{bmatrix}1,0,0 \end{bmatrix}$:

$
\begin{bmatrix}
M_{1,1} &amp; M_{1,2} &amp; M_{1,3} \\
M_{2,1} &amp; M_{2,2} &amp; M_{2,3} \\
M_{3,1} &amp; M_{3,2} &amp; M_{3,3} \\
\end{bmatrix}
*
\begin{bmatrix}
1 \\
0 \\
0 \\
\end{bmatrix}
=
\begin{bmatrix}
M_{1,1} \\
M_{2,1} \\
M_{3,1} \\
\end{bmatrix}
$

Now let's try vector $\begin{bmatrix}0,1,0\end{bmatrix}$:

$
\begin{bmatrix}
M_{1,1} &amp; M_{1,2} &amp; M_{1,3} \\
M_{2,1} &amp; M_{2,2} &amp; M_{2,3} \\
M_{3,1} &amp; M_{3,2} &amp; M_{3,3} \\
\end{bmatrix}
*
\begin{bmatrix}
0 \\
1 \\
0 \\
\end{bmatrix}
=
\begin{bmatrix}
M_{1,2} \\
M_{2,2} \\
M_{3,2} \\
\end{bmatrix}
$

And lastly, vector $\begin{bmatrix}0,0,1\end{bmatrix}$:

$
\begin{bmatrix}
M_{1,1} &amp; M_{1,2} &amp; M_{1,3} \\
M_{2,1} &amp; M_{2,2} &amp; M_{2,3} \\
M_{3,1} &amp; M_{3,2} &amp; M_{3,3} \\
\end{bmatrix}
*
\begin{bmatrix}
0 \\
0 \\
1 \\
\end{bmatrix}
=
\begin{bmatrix}
M_{1,3} \\
M_{2,3} \\
M_{3,3} \\
\end{bmatrix}
$

This shows that whatever matrix $M$ is, the first column is the X axis vector of the coordinate space defined by the matrix.  The second column is the Y axis vector, and the third column is the Z axis vector.

These vectors are in global space.

$
M =
\begin{bmatrix}
X_x &amp; Y_x &amp; Z_x \\
X_y &amp; Y_y &amp; Z_y \\
X_z &amp; Y_z &amp; Z_z \\
\end{bmatrix}
$

You can even see that this is true in an identity matrix, where the X,Y and Z vectors are just what you'd expect them to be:

$
M =
\begin{bmatrix}
1 &amp; 0 &amp; 0 \\
0 &amp; 1 &amp; 0 \\
0 &amp; 0 &amp; 1 \\
\end{bmatrix}
$



A 3x3 matrix is much like a vector in that it describes directions but has no position.

If you have a 4x4 matrix that represents a 3d transform and uses homogeneous coordinates for a translation, you can then use that to get the X,Y,Z orientation vectors, but also can get the translation from the origin.

Hopefully this is helpful, and not misleading for less common matrix types.  I saw an answer deleted which said similar, so fingers crossed :P