You can use rules to create the vertical and horizontal bars and then just put them into your array directy.
\documentclass{article}
\usepackage{array}
\begin{document}
\newcommand*{\vertbar}{\rule[1ex]{0.5pt}{2.5ex}}
\newcommand*{\horzbar}{\rule[.5ex]{2.5ex}{0.5pt}}
\[
A =
\left[
\begin{array}{cccc}
\vertbar & \vertbar & & \vertbar\\
a_{1} & a_{2} & \ldots & a_{n} \\
\vertbar & \vertbar & & \vertbar
\end{array}
\right]
\]
\setlength{\extrarowheight}{1ex}
\[
A =
\left[
\begin{array}{ccc}
\horzbar & a^{T}_{1} & \horzbar\\
\horzbar & a^{T}_{2} & \horzbar\\
& \vdots & \\
\horzbar & a^{T}_{n} & \horzbar
\end{array}
\right]
\]
\end{document}
