# plotting – Generating PlotLabel with mathematical formatting

What’s a good pattern to insert properly formatted matrices into `PlotLabel`? I’m trying to insert something like the following into my plot, where the matrix is programmatically generated.

$$f(x,y)= left( begin{array}{cc} x&y end{array} right) left( begin{array}{cc} 1.00 & 0.00 \ 0.00 & 2.00 \ end{array} right) left( begin{array}{c} x \ y \ end{array} right)$$

Doing `PlotLabel->MatrixForm(mymatrix)` displays the matrix part properly, but how do I concatenate it with the other bits?

``````rotatedAxes(angle_) := (
H = With({r = RotationMatrix(Pi/4)},
r . DiagonalMatrix({1, 2}) . Inverse(r));
f({x_, y_}) = {x, y} . H . {x, y};

rotmat = RotationMatrix(angle);
xaxis = rotmat . {5, 0};
yaxis = rotmat . {0, 5};
Hdisp =
Map(NumberForm(#, {3, 2}) &,
N(Inverse(rotmat) . H . rotmat), {2}) // MatrixForm;

ContourPlot(f({x, y}), {x, -2, 2}, {y, -2, 2},
ContourShading -> None, Contours -> 15,
ContourStyle -> Directive(RGBColor(0.5, 0.5, 1)), Frame -> None,
AxesStyle -> Directive(Black),
Epilog -> {
AxisObject(InfiniteLine({{0, 0}, xaxis}), {-1, 1},
TickLabels -> None),
AxisObject(InfiniteLine({{0, 0}, yaxis}), {-1, 1},
TickLabels -> None)},
PlotLabel -> Hdisp
)
);
rotatedAxes(Pi/4)
``````