Subdividindo uma matriz

Subdividindo uma matriz
\documentclass[12pt,a4paper]{article}
%------------------------------------------------------------
\usepackage{amsmath,amssymb,amsthm}
\begin{document}
\[ \begin{pmatrix}
1 &2 &0&\cdots& 0\\
3& 4 &0&\cdots& 0\\
0 & 0 &0&\cdots& 0\\
\vdots & \vdots & \vdots & \vdots\\
0 & 0 &0&\cdots& 0\\
\end{pmatrix}\]
and
\[U_k= \begin{bmatrix}
J_{k\times k} &0_{k\times (n-k)} \\
0_{(n-k)\times k}& I_{(n-k)\times (n-k)}\\
\end{bmatrix}\]
\end{document} 

Quero subdividir as duas matrizes a seguir

insira a descrição da imagem aqui

Como o seguinte

insira a descrição da imagem aqui

Responder1

Um breve currículo da resposta do @js bibra (resposta muito longa):

\documentclass[12pt,a4paper]{article}

\begin{document}
    \[ 
\left[\begin{array}{cc|*{3}{c}}
1       & 2      & 0      & \cdots & 0      \\
3       & 4      & 0      & \cdots & 0      \\
    \hline
0       & 0      & 0      & \cdots & 0      \\
\vdots  & \vdots & \vdots & \ddots & \vdots \\
0       & 0      & 0      & \cdots & 0      
\end{array}\right]
\]
and
\[
U_k = \left[\begin{array}{c|c}
    J_{k\times k}       & 0_{k\times (n-k)}     \\
        \hline
    0_{(n-k)\times k}   & I_{(n-k)\times (n-k)}
      \end{array}\right]
\]
\end{document} 

insira a descrição da imagem aqui

Responder2

https://tex.stackexchange.com/a/240865/197451

insira a descrição da imagem aqui

\documentclass{article}
\begin{document}
  \[
    M = \left(
    \begin{array}{c|c}
      A & B\\
      \hline
      C & D
    \end{array}
    \right)
  \]
\end{document}

para matrizes maiores

insira a descrição da imagem aqui

Fonteclicando nesta palavra.


Responder3

Simples com pstricks: insira nós vazios nos locais relevantes da matriz e conecte-os com linhas:

\documentclass[12pt, a4paper, svgnames]{article}
%------------------------------------------------------------
\usepackage{amsmath,amssymb,amsthm}
\usepackage{pst-node}

\begin{document}

\[ \begin{pmatrix}
1 &2 \pnode[1ex, 1.6ex]{V}&0&\cdots& 0\\
\pnode[-0.6ex, -0.7ex]{H}3& 4 &0&\cdots& 0\pnode[0.6ex, -0.7ex]{K}\\
0 & 0 &0&\cdots& 0\\
\vdots & \vdots & \vdots & \vdots\\
0 & 0 \pnode[1ex, -0.5ex]{W} &0&\cdots& 0
\end{pmatrix}
\psset{linecolor=IndianRed}
\ncline{V}{W}\ncline{H}{K}\]
and
\[U_k= \begin{bmatrix}
J_{k\times k} &\pnode[0,1.6ex] {V}& 0_{k\times (n-k)} \\
\pnode[-0.3ex,1.9ex]{H} 0_{(n-k)\times k}&\pnode[0,-0.6ex] {W} & I_{(n-k)\times (n-k)}\pnode[0.3ex, 1.9ex]{K}
\end{bmatrix}
\psset{linecolor=SteelBlue}
\ncline{V}{W}\ncline{H}{K} \]

\end{document} 

insira a descrição da imagem aqui

informação relacionada