매트릭스 환경의 수직 간격: 어떻게 동일하게 할 수 있습니까?

매트릭스 환경의 수직 간격: 어떻게 동일하게 할 수 있습니까?

내 문제는 다음과 같습니다. 야코비 행렬을 다른 두 행렬의 곱으로 작성하려고 하는데 높이가 다르기 때문에 결과가 잘못되었습니다. 내 코드는 다음과 같습니다.

\documentclass[11pt]{book}
\usepackage{amsmath}
\begin{document}

\begin{align*}
   Jac(f \circ \varphi)_{x_0} =& Jac(f)_{\varphi(x_0)} Jac(\varphi)_{x_0} \\
   =& \begin{pmatrix}
     \frac{\partial f}{\partial x}(r \cos(\theta), r \sin(\theta)) \\
     \frac{\partial f}{\partial y}(r \cos(\theta), r \sin(\theta))
   \end{pmatrix} \begin{pmatrix}
     \cos(\theta) & -r \sin(\theta) \\
     \sin(\theta) & r \cos(\theta)
   \end{pmatrix}
 \end{align*}
\end{document}

나는 트릭을 /em으로 사용하고 싶지 않습니다. 해결책이 있습니까? 감사해요 !

답변1

나는 행렬이 같은 높이를 갖도록 주장하지 않을 것입니다. 오히려 나는 \dfrac내부 편미분을 사용하고 약간의 행 간격을 둡니다. 동일한 높이를 갖는 두 번째 정렬을 참조하세요.

\documentclass[11pt]{book}
\usepackage{amsmath}
\DeclareMathOperator{\Jac}{Jac}

\begin{document}

\begin{align*}
\Jac(f \circ \varphi)_{x_0} 
&= \Jac(f)_{\varphi(x_0)} \Jac(\varphi)_{x_0} \\
&= \begin{pmatrix}
   \dfrac{\partial f}{\partial x}(r \cos(\theta), r \sin(\theta)) \\[3ex]
   \dfrac{\partial f}{\partial y}(r \cos(\theta), r \sin(\theta))
   \end{pmatrix}
   \begin{pmatrix}
   \cos(\theta) & -r \sin(\theta) \\[2ex]
   \sin(\theta) & r \cos(\theta)
   \end{pmatrix}
\end{align*}
\begin{align*}
\Jac(f \circ \varphi)_{x_0} 
&= \Jac(f)_{\varphi(x_0)} \Jac(\varphi)_{x_0} \\
&= \begin{pmatrix}
   \frac{\partial f}{\partial x}(r \cos(\theta), r \sin(\theta)) \\[1ex]
   \frac{\partial f}{\partial y}(r \cos(\theta), r \sin(\theta))
   \end{pmatrix}
   \begin{pmatrix}
   \cos(\theta) & -r \sin(\theta) \\[1ex]
   \sin(\theta) & r \cos(\theta)
   \end{pmatrix}
\end{align*}
\end{document}

&=대신에 수학 연산자와 올바른 사용법을 참고하세요 =&.

여기에 이미지 설명을 입력하세요

답변2

\mfrac패키지 의 (중간 크기 분수)를 사용하면 nccmath행렬에 더 적합한 크기가 제공됩니다. (미적으로 말하면) 더 나쁜 것은 선을 거의 정렬하는 것이므로 두 번째 행렬의 행 사이에 수동으로 공간을 추가해야 하며 글꼴이나 글꼴 크기를 변경하면 모든 것을 다시 조정합니다.

패키지를 사용하고 내부에 구분 기호가 있는 1개의 행렬만 작성하여 행렬을 정확하게 정렬하는 자동 방법이 있습니다 blkarray. 그러나 여기에는 몇 가지 결함이 있습니다. 정렬과 잘 작동하지 않으므로 예를 들어 정렬 지점(=)을 before앰퍼샌드로 작성해야 합니다. 어쨌든 다음 코드는 두 가지 방법을 모두 보여줍니다. 또한 cellspace행렬의 선을 쉽게 작성하기 위해 패키지를 사용했습니다 (blkarray에서는 작동하지 않음).

    \documentclass[11pt, leqno]{book}
    \usepackage[utf8]{inputenc}
    \usepackage{amsmath}

    \DeclareMathOperator{\Jac}{Jac}
    \usepackage{blkarray}
    \usepackage{nccmath}
    \usepackage[math]{cellspace}
    \cellspacetoplimit = 3pt
    \cellspacebottomlimit = 3pt

    \begin{document}

    \begin{align*}
     \Jac(f \circ \varphi)_{x_0} =&\Jac(f)_{\varphi(x_0)} \Jac(\varphi)_{x_0} \\
    \tag*{\small manual adjustment:}           =& \begin{pmatrix}
         \mfrac{\partial f}{\partial x}(r \cos(\theta), r \sin(\theta)) \\
         \mfrac{\partial f}{\partial y}(r \cos(\theta), r \sin(\theta))
       \end{pmatrix} \begin{pmatrix}
         \cos(\theta) & -r \sin(\theta) \\[6pt]
         \sin(\theta) & r \cos(\theta)
       \end{pmatrix}
       \\%
    \tag*{\small with blkarray:}       = &{\ } \begin{blockarray}[t]{(c)!{\ }(cc)}
        \mfrac{\partial f}{\partial x}(r \cos(\theta), r \sin(\theta)) &  \cos(\theta) & -r \sin(\theta)\\[8pt]
         \mfrac{\partial f}{\partial y}(r \cos(\theta), r \sin(\theta)) & \sin(\theta) & r \cos(\theta)
        \end{blockarray}
     \end{align*}

    \end{document} 

여기에 이미지 설명을 입력하세요

관련 정보