I am drawing a matrix as follows:
\[\begin{tabular}{l|lllll|ll}
& 0 & i & j & k & $\ldots$ & x & y \\ \hline
0 & 0 & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$\\
i & $\ldots$ & 0 & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$\\
j & $\ldots$ & $\ldots$ & 0 & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$\\
k & $\ldots$ & $\ldots$ & $\ldots$ & 0 & $\ldots$ & $\ldots$ & $\ldots$ \\
$\vdots$ & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$\\ \hline
x & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$ & 0 &$\ldots$\\
y & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$ & $\ldots$ & 0
\end{tabular}\]
And it gives:
The contents are fine, one problem is that I just want to keep a part of the horizontal and vertical lines which across inside the matrix. So I would like the lines to look like this image:
Does anyone know what to do to achieve this?
array
environment instead oftabular
: contents of each cell will be automatically in math mode (so you remove all the dollar signs). Secondly, for the horizontal lines, you can replace\hline
by\cline[1-5]
(change the numbers as needed). For the vertical line, you will have to put\multicolumn{1}{c}{$\cdots}
as the contents of the cell just on the left of the line you want to remove. I hope this works, and if it does, feel free to post the resulting code. :) --- Merry Christmas!\ddots
.