Can I make a matrix from just a parts of the cells?
i.e. not all the cells just some of it, like here:
It possible to make something like this?
Thank you!!
P.S. I'm using LyX.
Can I make a matrix from just a parts of the cells?
i.e. not all the cells just some of it, like here:
It possible to make something like this?
Thank you!!
P.S. I'm using LyX.
The blkarray package makes it particularly easy:
\documentclass{article}
\usepackage{amsmath}
\usepackage{blkarray}
\begin{document}
\[
\begin{blockarray}{*{5}{c}}
1 & 7 & 8 & 6 & 52 \\
\begin{block}{c[ccc]c}
3 & 17 & 9 & 9 & 1 \\
12 & 10 & 9 & 6 & 5 \\
\end{block}
1 & 2 & 2 & 4 & 5
\end{blockarray}
\]
\end{document}
You can easily do that with {bNiceMatrix} of nicematrix.
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
$\begin{bNiceMatrix}[first-row,first-col,last-row,last-col]
1 & 7 & 8 & 6 & 52 \
3 & 17 & 9 & 9 & 1 \
12 & 10 & 9 & 6 & 5 \
1 & 2 & 2 & 4 & 5
\end{bNiceMatrix}$
\end{document}
With nicematrix, you have also tools to put delimiters exactly where you want.
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
$\begin{NiceMatrix}
1 & 7 & 8 & 6 & 52 \
3 & 17 & 9 & 9 & 1 \
12 & 10 & 9 & 6 & 5 \
1 & 2 & 2 & 4 & 5
\CodeAfter
\SubMatrix[{2-2}{3-3}]
\end{NiceMatrix}$
\end{document}
tikzpicture or use packagenicematrix, etc. What you try so far? – Zarko Jul 27 '19 at 17:57blkarrayperhaps (e.g. https://tex.stackexchange.com/questions/30791/array-with-labeling-columns/30792#30792, there are more examples on the site). You would have to write the code manually though, I don't think LyX has implemented support forblkarray. – Torbjørn T. Jul 27 '19 at 18:00