How can I draw a curly bracket on the right side of these two vertically stacked matrices?
Here's the MWE for the matrices:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}
$$
X = \begin{bmatrix}
x & \cdots & x\
\vdots & \ddots & \vdots\
x & \cdots & x
\end{bmatrix}
$$
$$
Y = \begin{bmatrix}
y & \cdots & y\
\vdots & \ddots & \vdots\
y & \cdots & y
\end{bmatrix}
$$
\end{document}


$$in LaTeX. – egreg Oct 01 '21 at 10:34\[ … \]preferable to$$? – egreg Oct 02 '21 at 13:28