i do not understand what is benefits if you put matrix inside nodes. if you like to have it as image, where each matrix element has a name, that you need to write matrix as tikz
picture:
\documentclass[10pt,a4paper]{article}
%\usepackage[latin1]{inputenc} % default in article is utf8
\usepackage{amsmath} % loaded by mathtools
%\usepackage{amsfonts} % loaded by amssymb
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{backgrounds, fit, matrix}
\newtheorem{xmp}{Example}
\usepackage{url}
\begin{document}
\begin{xmp}
\[
\mathbf{A}_{4\times 4}=
\begin{tikzpicture}[baseline]
\matrix (m) [matrix of math nodes,%
nodes={inner sep=1pt, text width=3ex, align=right},
left delimiter={[},right delimiter={]},
column sep=1ex, row sep=1ex,
]
{
-9 & -1 & 0 & -3 \\
-5 & -8 & -9 & 4 \\
7 & 3 & -1 & -7 \\
-8 & 1 & 2 & 7 \\
};
\end{tikzpicture}
\]
\end{xmp}
\begin{xmp}
\[
\mathbf{A}_{4\times 4}=
\begin{tikzpicture}[baseline]
\matrix (m) [matrix of math nodes,%
nodes={inner sep=1pt, text width=3ex, align=right},
left delimiter={[},right delimiter={]},
column sep=1ex, row sep=1ex,
]
{
-9 & -1 & 0 & -3 \\
-5 & -8 & -9 & 4 \\
7 & 3 & -1 & -7 \\
-8 & 1 & 2 & 7 \\
};
\scoped[on background layer]
\node[fill=red!30,inner sep=1pt,
fit=(m-2-2) (m-4-4)] {};
\end{tikzpicture}
\]
\end{xmp}
an example of the representation of determinants calculation (taken from \url{http://tex.stackexchange.com/questions/257043/})
\[
\mathbf{A}_{3\times 3}=
\begin{tikzpicture}[baseline,
strip/.style = {
draw=#1,%color
line width=1em, opacity=0.2,
line cap=round,% only if you like them ...
shorten <=-1mm, shorten >=-1mm,
},
]
\matrix (m) [matrix of math nodes,
column sep=1em,
nodes={text height=1ex,text width=2ex}
]
{
|[red]|+
& |[red]|+
& \color{red}+\color{blue}-
& |[blue]|-
& |[blue]|- \\[3.3mm,between origins]
a_1 & b_1 & c_1 & a_1 & a_2 \\
a_2 & b_2 & c_2 & a_2 & b_2 \\
a_3 & b_3 & c_3 & a_3 & b_3 \\
};
\draw[thick] (m-2-1.north) -| (m-4-1.south west)
-- (m-4-1.south);
\draw[thick] (m-2-3.north) -| (m-4-3.south east)
-- (m-4-3.south);
\draw[strip=blue]%
(m-4-1.center) edge (m-2-3.center)
(m-4-2.center) edge (m-2-4.center)
(m-4-3.center) -- (m-2-5.center);
\draw[strip=red]
(m-2-1.center) edge (m-4-3.center)
(m-2-2.center) edge (m-4-4.center)
(m-2-3.center) -- (m-4-5.center);
\end{tikzpicture}
\]
\[
\det A = (\textcolor{red} {a_1b_2c_3 + b_1c_2a_3 + c_1a_2b_3}) -
(\textcolor{blue}{a_3b_2c_1 + b_3c_2a_1 + c_3a_2b_1})
\]
\end{document}

\begin{tikzpicture} \(
and\) \end{tikzpicture}
, do you get what you need? – Torbjørn T. Jul 28 '18 at 17:06tikz
block because I'll do some highlights and paths inside the matrix. – Levy Jul 28 '18 at 17:09tikzpicture
though, place thebmatrix
inside a node. I'll add an answer, – Torbjørn T. Jul 28 '18 at 17:13