# How to Emphasis/Highlight Specific Components of a Matrix (e. g. Bold or Color)

I have the following matrix

\begin{pmatrix}
1 & 3 & 2 & 6 \\
4 & 1 & 8 & 2 \\
3 & 9 & 4 & 12 \\
12 & 3 & 16 & 4
\end{pmatrix}


And I want the '1' and '6' from the first row and '12' and '4' from the last row to be marked in some way. Either in bold lettering or inside a small 'box' or some other way (not a different color though). I want it to be clear to the reader, these are the Komponents to pay attention to. Does anyone know how to do this?

## Code

\documentclass[]{article}

\usepackage{amsmath}
\usepackage{bm}

\begin{document}

% https://tex.stackexchange.com/questions/595

$$\begin{pmatrix} \bm{1} & 3 & 2 & \bm{6} \\ 4 & 1 & 8 & 2 \\ 3 & 9 & 4 & 12 \\ \bm{12} & 3 & 16 & \bm{4} \end{pmatrix}$$

\end{document}


## Output

Three other possibilities:

\documentclass[]{article}
\usepackage[svgnames]{xcolor}
\usepackage{mathtools}
\usepackage{bm}
\newcommand\ub[1]{\underbracket[0.4pt][1.5pt]{\mkern1mu#1\mkern1mu}}
\newcommand\hl[1]{\color{DarkGrey}{\bm{#1}}}

\begin{document}

$$\setlength\fboxsep{2pt} \begin{pmatrix} \boxed{1} & 3 & 2 & \boxed{6} \\ 4 & 1 & 8 & 2 \\ 3 & 9 & 4 & 12 \\ \boxed{12} & 3 & 16 & \boxed{4} \end{pmatrix} \qquad \begin{pmatrix} \ub{1} & 3 & 2 & \ub{6} \\ 4 & 1 & 8 & 2 \\ 3 & 9 & 4 & 12 \\ \ub{12} & 3 & 16 & \ub{4} \end{pmatrix} \qquad \begin{pmatrix} \hl{1} & 3 & 2 & \hl{6} \\ 4 & 1 & 8 & 2 \\ 3 & 9 & 4 & 12 \\ \hl{12} & 3 & 16 & \hl{4} \end{pmatrix}$$

\end{document}