[Tex/LaTex] Block matrix with vectors

matricesvector

I'm trying to typeset matrices composed of row vectors like this:

enter image description here

It uses a bar to represent row vectors. I'd also like vertical bars to represent column vectors. What is the best way to achieve this?

Thanks to @Przemysław's answer. Here is also how to typeset the original matrices (with dots):

\[
\mathrm{d}\left[
  \begin{array}{c@{\,}c@{\,}c}
    & \vdots & \\[3pt]
    \raisebox{3pt}{\rule{5mm}{0.2pt}} & \rule{0mm}{10pt} cR & \raisebox{3pt}{\rule{5mm}{0.2pt}}\\[3pt]
    & \vdots & 
  \end{array}
\right]=c\mathrm{d}\left[
  \begin{array}{c@{\,}c@{\,}c}
    & \vdots & \\[3pt]
    \raisebox{3pt}{\rule{5mm}{0.2pt}} & \rule{0mm}{10pt} R & \raisebox{3pt}{\rule{5mm}{0.2pt}}\\[3pt]
    & \vdots & 
  \end{array}
\right]
\]

enter image description here

Changing \vdots to \vline produces the column vectors.

Best Answer

An example of tle left-hand side (exact parameters to be chosen):

\documentclass{article}
\begin{document}

\[
\mathrm{d}\left[
\begin{array}{c@{\,}c@{\,}c}
& \vline & \\[3pt]
\raisebox{3pt}{\rule{5mm}{0.2pt}} & \rule{0mm}{10pt} cR & \raisebox{3pt}{\rule{5mm}{0.2pt}}\\[3pt]
& \vline & 
\end{array}
\right]
\]

\end{document}

enter image description here