Math & Science ⇒ How to write a code for this ?
How to write a code for this ?
How to write a LaTeX code to generate the matrix shown in the following image? Regards
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to write a code for this ?
Code: Select all
\[
% \renewcommand{\arraystretch}{1.2}
\left[
\begin{array}{ccc}
A_{11} & \multicolumn{1}{c|}{A_{12}} & 0 \\ \cline{2-3}
A_{21} & \multicolumn{1}{|c|}{A_{22}} & A_{23} \\ \cline{1-2}
0 & \multicolumn{1}{|c}{A_{32}} & A_{33}
\end{array}
\right]
\]
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
How to write a code for this ?
but your code doesn't produce the required result, it produces this: Nevertheless, using the same idea, a valid code is:
Code: Select all
\[
\left[
\begin{array}{ccc}
A_{11} & \multicolumn{1}{c|}{A_{12}} & 0 \\ \cline{2-3}
A_{21} & \multicolumn{1}{|c|}{A_{22}} & 0 \\ \cline{1-2}
0 & \multicolumn{1}{|c}{A_{32}} & A_{33}
\end{array}
\right]
\]
but it doesn't look elegant as you said.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to write a code for this ?
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: How to write a code for this ?
Regards,
M.A