![주어진 방식으로 Latex에서 블록 매트릭스를 작성하는 방법](https://rvso.com/image/400362/%EC%A3%BC%EC%96%B4%EC%A7%84%20%EB%B0%A9%EC%8B%9D%EC%9C%BC%EB%A1%9C%20Latex%EC%97%90%EC%84%9C%20%EB%B8%94%EB%A1%9D%20%EB%A7%A4%ED%8A%B8%EB%A6%AD%EC%8A%A4%EB%A5%BC%20%EC%9E%91%EC%84%B1%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95.png)
다음과 같은 방법으로 Latex에서 블록 매트릭스를 작성하는 방법:
나는 다음 코드를 작성했습니다.
\[
Q=\left[
\begin{array}{c c c c}
\textbf{nI}& \vline & \textbf{J}\\
\hline
\textbf{J^T} &\vline &\textbf{K}
\end{array}
\right]
\]
다음 오류가 발생합니다.
! 추가 } 또는 잊어버린 $.\textdef@ ...th {#1}\let \f@size #2\selectfont #3}} \textbf{J^T}
그리고 여기에 넣기 어려운 더 많은 오류가 있습니다.
누군가 친절하게 도와줄 수 있나요?
답변1
답변2
\textbf 명령 안에 위 첨자가 있다는 사실이 마음에 들지 않습니다.
\documentclass[10pt]{article}
\begin{document}
\begin{equation}
Q=\left[
\begin{array}{c c c c}
\textbf{nI}& \vline & \textbf{J}\\
\hline
\textbf{J}^\textbf{T} &\vline &\textbf{K}
\end{array}
\right]
\end{equation}
\end{document}
답변3
내 제안에는 두 가지 예가 포함되어 있습니다. 분명히 텍스트 문자의 크기를 늘리거나 줄이는 일반적인 명령을 사용하여 행렬 내부의 문자 크기를 변경할 수 있습니다.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\renewcommand\arraystretch{1.5}
\left[\begin{array}{@{}c|c@{}}
\mbox{\Large A} & \mbox{\Large B} \\
\hline
\mbox{\Large C} & \mbox{\Large D}
\end{array}\right], \quad \left[\begin{array}{@{}c|c@{}}
\mbox{\Large $A$} & \mbox{\Large $B$} \\
\hline
\mbox{\Large $C$} & \mbox{\Large $D$}
\end{array}\right]
\]
\end{document}