![하부 삼각 행렬에 큰 0이 있는 상부 삼각 행렬이요?](https://rvso.com/image/254726/%ED%95%98%EB%B6%80%20%EC%82%BC%EA%B0%81%20%ED%96%89%EB%A0%AC%EC%97%90%20%ED%81%B0%200%EC%9D%B4%20%EC%9E%88%EB%8A%94%20%EC%83%81%EB%B6%80%20%EC%82%BC%EA%B0%81%20%ED%96%89%EB%A0%AC%EC%9D%B4%EC%9A%94%3F.png)
아래와 같이 상부 사다리꼴 행렬을 표현할 수 있습니다. 나는 모든 0을 낮은 삼각형 행과 열에 걸쳐 있는 하나의 큰 0으로 바꾸고 싶습니다. 또한 대각선을 따라 위쪽 대각선 행렬임을 명확하게 보여주는 구분 기호를 추가할 수도 있습니다. 어떻게 해야 합니까?
\newcommand\x{\XSolid}
%\newcommand\x{\ding{53}}
\begin{equation}
\left(
\begin{array}{*5{c}}
\x & \x & \x & \x & \x \\
0 & \x & \x & \x & \x \\
0 & 0 & \x & \x & \x \\
0 & 0 & 0 & \x & \x \\
0 & 0 & 0 & 0 & \x \\
\end{array}\right)
\end{equation}
별도의 질문입니다. \x
내가 정의한 명령이 #
의도한 십자 기호가 아닌 출력을 출력하는 이유는 무엇입니까? 또는를 #
사용하더라도 동일한 기호를 출력합니다.\XSolid
\ding{53}
업데이트: 답변을 입력으로 받아 다음 작업을 마쳤습니다.
\newcommand\x{\times}
\newcommand\bigzero{\makebox(0,0){\text{\huge0}}}
\newcommand*{\bord}{\multicolumn{1}{c|}{}}
\begin{equation}
\left(
\begin{array}{ccccc}
\x & \x & \x & \x & \x \\ \cline{1-1}
\bord & \x & \x & \x & \x \\ \cline{2-2}
& \bord & \x & \x & \x \\ \cline{3-3}
& \bigzero & \bord & \x & \x \\ \cline{4-4}
& & & \bord & \x \\ \cline{5-5}
\end{array}\right)
\end{equation}
이는 다음을 생성합니다.
답변1
\documentclass[]{article}
\usepackage{mathtools}
\begin{document}
\[
\left(
\begin{array}{ccccc}
1 \\
& 1 & & \text{\huge0}\\
& & 1 \\
& \text{\huge0} & & 1 \\
& & & & 1
\end{array}
\right)
\]
\end{document}
또는 \makebox(0,0){\text{\huge0}}
동일한 줄 간격을 원할 경우.
답변2
만약을 대비해 대각선을 따라 반복되는 점이 필요할 수도 있습니다. 여기 그렇게 하는 추악한 방법이 있습니다.
\newcount\dotcnt\newdimen\deltay
\def\Ddot#1#2(#3,#4,#5,#6){\deltay=#6\setbox1=\hbox to0pt{\smash{\dotcnt=1
\kern#3\loop\raise\dotcnt\deltay\hbox to0pt{\hss#2}\kern#5\ifnum\dotcnt<#1
\advance\dotcnt 1\repeat}\hss}\setbox2=\vtop{\box1}\ht2=#4\box2}
그리고 예를 들어보겠습니다(물론 amsmath를 사용하여):
\[\begin{pmatrix}
1\Ddot{12}.(6pt,-2pt,6pt,-5pt)&1\Ddot8.(9pt,2pt,6pt,0pt)&\quad&\quad&1\\
&&&&\\
&&&&\\
&&&&\\
&\mbox{\Huge 0}&&&\\
&&&&1\\
\end{pmatrix}\]
답변3
의 .{pNiceMatrix}
nicematrix
\documentclass{article}
\usepackage{nicematrix,tikz}
\begin{document}
$\begin{pNiceMatrix}[left-margin]
\times & \times & \times & \times & \times \\
& \times & \times & \times & \times \\
& & \times & \times & \times \\
\Block{2-2}<\Huge>{0}
& & & \times & \times \\
& & & & \times \\
\CodeAfter
\tikz \draw (2-|1) -| (3-|2) -| (4-|3) -| (5-|4) -| (6-|5) ;
\end{pNiceMatrix}$
\end{document}