# Adding text over matrix in LaTeX

I am trying to accomplish this in LaTeX.

        j
⎡a  b  c⎤
|d  e  f|
⎣h  i  j⎦


so that the "j" is aligned with the center of the matrix.

It seems like I can't use the \begin{align} in LaTeX while also using the \begin{matrix} environment, because any & inside the matrix environment will not apply to the align environment

Another array around the matrix should do the trick:

\begin{array}{c}
j \\
\left[
\begin{array}{ccc}
a & b & c \\
d & e & f \\
h & i & j % you forgot g! ;)
\end{array}
\right]
\end{array}