The metric tensor is an (0,2) tensor that is denoted by $g_{\mu\nu}$ in general relativity. I often see people write the metric field in matrix form like \begin{equation} g_{\mu\nu} = \begin{bmatrix} g_{11} & g_{12} & g_{13} & g_{14} \\ g_{21} & g_{22} & g_{23} & g_{24} \\ g_{31} & g_{32} & g_{33} & g_{34} \\ g_{41} & g_{42} & g_{43} & g_{44} \\ \end{bmatrix} \end{equation} But I thought all matrices are 2-tensors but not vice versa based on this thread
Can someone explain if the above metric tensor is an appropriate way to write the metric tensor? How do we know a metric tensor can be written as a matrix?
Note:
I assume if $g_{\mu\nu}$ is written correctly, then I can write the Ricci tensor as
\begin{equation} R_{ab} = \begin{bmatrix} R_{11} & R_{12} & R_{13} & R_{14} \\ R_{21} & R_{22} & R_{23} & R_{24} \\ R_{31} & R_{32} & R_{33} & R_{34} \\ R_{41} & R_{42} & R_{43} & R_{44} \\ \end{bmatrix} \end{equation}
There are three kinds of 2-tensors, of type $(0,2)$, $(2,0)$ and $(1,1)$. Let's take the metric tensor $g$ of type $(0,2)$.
If $p$ is a point in your manifold and $V:=T_p M$ the tangential space as a vectorspace, then the metric is a bilinear map $$ g_p:V \times V \rightarrow \mathbb{R} $$ and "the matrix" of $g$ is a description of $g$ if you choose a basis $e_1,\dots ,e_4$ (which usually is $\partial_1|_p,...\partial_4|_p$ in a coordinate system) of $V$. This matrix is defined by $$ g_{ij}|_p = g_p(e_i,e_j) \qquad g_{ij} = g(e_i,e_j) $$ (most of the time one ignores $p$ and thinks about functions of $p$ in a coordinate system)
So:
Yes, your matrix is an appropriate way of writing a metric tensor
Yes, every matrix IS a 2-tensor (always "in" a coordinate sytem) BUT
this matrix depends on the choosen basis. And the other types of 2-tensors are bilinear maps $$ V \times V^* \rightarrow \mathbb{R} \quad \text{and} \quad V^* \times V^* \rightarrow \mathbb{R} $$ (where $V^*$ is the dual space of $V$ = the $1-$forms = covectors = dual vectors = covariant vectors,etc) which can also be described by a matrix as long as you choose a basis for $V$ and $V^*$. This different kinds are indicated by index placement $$ g^i_j \quad \text{and} \quad g^{ij} $$ but in our case these things "are" ordinary $4\times 4$-matrices over $\mathbb R$.
Fact: if you have a matrix, you must "know" the type of the tensor if you want to produce a tensor from this matrix
Where does the confusion come from:
$g$ is non-degenerate, which means $g(v,w)=0$ for all $w$ implies $v=0$
which is equivalent to $$ V \rightarrow V^* \qquad v \mapsto g(v,-) $$ beeing an isomorphism. So $g$ identifies $V$ and $V^*$ and this isomorphism is implicit if in physics one speaks of an $2-$tensor without mentioning it's type. Because you can now identify $$ \operatorname{Bil}(V\times V,\mathbb R)= \operatorname{Bil}(V\times V^*,\mathbb R)= \operatorname{Bil}(V^*\times V^*,\mathbb R) $$