Note that $$...$$
shouldn't be used in LaTeX, see Why is \[ ... \] preferable to $$ ... $$?; also a4wide
is a deprecated package. If you want to widen the text area, use geometry
.
You can obtain what you want with blkarray
:
\documentclass[12pt]{article}
\usepackage{amsmath,blkarray}
\begin{document}
\[
\begin{blockarray}{cc}
\begin{block}{(c@{\rlap{,}}c)}
2 & 3 \\
\end{block}
\begin{block}{[cc]}
\cos\theta & -\sin\theta \\
\sin\theta & \cos\theta \\
\end{block}
\end{blockarray}
\]
\end{document}
If you want to distance the two blocks, add a phantom row and some vertical negative space:
\documentclass[12pt]{article}
\usepackage{amsmath,blkarray}
\begin{document}
\[
\begin{blockarray}{cc}
\begin{block}{(c@{\rlap{,}}c)}
2 & 3 \\
\end{block}
& \\[-2ex]
\begin{block}{[cc]}
\cos\theta & -\sin\theta \\
\sin\theta & \cos\theta \\
\end{block}
\end{blockarray}
\]
\end{document}
Original answer, superseded by OP's comments.
Matrices are better typeset with the environments provided by amsmath
, rather than directly with array
.
\documentclass[12pt]{article}
\usepackage{amsmath,mathtools,calc}
\begin{document}
\[
\begin{pmatrix}
\mathmakebox[\widthof{$\cos\theta$}]{2}\mathrlap{\ \ ,}&
\mathmakebox[\widthof{$-\sin\theta$}]{3}
\end{pmatrix}
\begin{bmatrix}
\cos\theta & -\sin\theta \\
\sin\theta & \cos\theta
\end{bmatrix}
\]
\[
\begin{bmatrix}
2 & 3
\end{bmatrix}
\begin{bmatrix}
\cos\theta & -\sin\theta \\
\sin\theta & \cos\theta
\end{bmatrix}
\]
\end{document}