\documentclass{article}% Herbert Voss
%% Bold symbol macro for standard LaTeX users
\newcommand{\boldsymbol}[1]{\mbox{\boldmath $#1$}}
\begin{document}
\title{Boxed Line or Column in a Matrix}
\date{25.10.2002}
\author{Herbert Vo\ss}
\maketitle
\section{Boxed Line}

\begin{verbatim}
\begin{equation}
\overrightarrow{A}=\left[
    \begin{array}{cccc}
	1 & 2 & 3 & 4\\
	1 & 2 & 3 & 4\\\hline
	\multicolumn{1}{|c}{1} & 2 & 3 & 
	\multicolumn{1}{c|}{4}\\\hline
	1 & 2 & 3 & 4
    \end{array}\right]
\end{equation}
\end{verbatim}


\begin{equation}
\overrightarrow{A}=\left[
    \begin{array}{cccc}
	1 & 2 & 3 & 4\\
	1 & 2 & 3 & 4\\\hline
	\multicolumn{1}{|c}{1} & 2 & 3 & 
	\multicolumn{1}{c|}{4}\\\hline
	1 & 2 & 3 & 4
    \end{array}\right]
\end{equation}



\section{Boxed Column}

This seems to be a little bit easier to realize. It uses the \LaTeX{}
command \verb|\cline{<fromColumn - toColumn>}| for
the first and the last line.


\begin{verbatim}
\begin{equation}
\overrightarrow{A}=\left[
    \begin{array}{cc|c|c}\cline{3-3}
	1 & 2 & 3 & 4\\
	1 & 2 & 3 & 4\\
	1 & 2 & 3 & 4\\
	1 & 2 & 3 & 4\\cline{3-3}
    \end{array}\right]
\end{equation}
\end{verbatim}

\begin{equation}
\overrightarrow{A}=\left[
    \begin{array}{cc|c|c}\cline{3-3}
	1 & 2 & 3 & 4\\
	1 & 2 & 3 & 4\\
	1 & 2 & 3 & 4\\
	1 & 2 & 3 & 4\\\cline{3-3}
    \end{array}\right]
\end{equation}



\section{Boxed Line and Column}

This is the combination of the above one.

\begin{verbatim}
\begin{equation}
\overrightarrow{A}=\left[
    \begin{array}{cc|c|c}\cline{3-3}
	1 & 2 & 3 & 4\\
	1 & 2 & 3 & 4\\\hline
	\multicolumn{1}{|c}{1} & 2 & 3 & 
	\multicolumn{1}{c|}{4}\\\hline
	1 & 2 & 3 & 4\\\cline{3-3}
    \end{array}\right]
\end{equation}
\end{verbatim}


\begin{equation}
\overrightarrow{A}=\left[
    \begin{array}{cc|c|c}\cline{3-3}
	1 & 2 & 3 & 4\\
	1 & 2 & 3 & 4\\\hline
	\multicolumn{1}{|c}{1} & 2 & 3 & 
	\multicolumn{1}{c|}{4}\\\hline
	1 & 2 & 3 & 4\\\cline{3-3}
    \end{array}\right]
\end{equation}

\end{document}
