[Tex/LaTex] horizontal line/rule in column vector

blockmatricesrules

Trying to generate a column vector with a horizontal line/rule separating top half of the vector from the bottom half. Am starting from the following MWE:


\documentclass[11pt,letterpaper,oneside]{article}

\usepackage{amsmath}

\begin{document}

\begin{equation*}
\textbf{Y}=\begin{bmatrix}
 11\\
12\\
11\\
14\\
\rule{1.5em}{0.5pt}\\
8\\
11\\
12\\
10
\end{bmatrix}
\end{equation*}

\end{document} 

Works more or less, but I'm trying to tweak aesthetics by reducing the height above/below the rule. Functionally, this is analogous to trying to change the height of a single row n a matrix, which I don't think is doable.

I know I can move the rule up as desired using \raisebox


\raisebox{.5ex}{\rule{1.5em}{0.5pt}}\\

but that doesn't entirely satisfy.

Even possible? Basically, I'd like the space above/below the rule to be the same as the default spacing above/below each row.

Thanks…I can live with what I've got, but would like to tweak it, if possible.

Best Answer

Two possibilities, the idea of the second one can be used for general partitioned matrices where \cmidrule defined by booktabs doesn't mix with vertical rules in an array.

\documentclass[11pt,letterpaper,oneside]{article}

\usepackage{amsmath,booktabs}

\begin{document}

\begin{equation*}
\textbf{Y}=\begin{bmatrix}
  11\\
  12\\
  \cmidrule(lr){1-1}
  8\\
  10
\end{bmatrix}
=\left[\begin{array}{@{}c@{}}
  11\\
  12\\
  \hline
  8\\
  10
\end{array}\right]
\end{equation*}

\end{document}

enter image description here