Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to insert parentheses around a group of elements creating a matrix within a larger matrix. So far I have this:

\begin{equation}
\begin{bmatrix}
\begin{matrix}
0 & 0 \\
0 & \omega_0 \\
-\omega_0 & 0 \\
0 & 0
\end{matrix} &
\begin{matrix}
-\frac{p_1}{2} & -\frac{p_2}{2} & 0 \\
0 & 0 & \frac{p_2}{2} \\
-\frac{p_2}{2} & \frac{p_1}{2} & 0 \\
\end{matrix} \\
\begin{matrix}
0 & 0 \\
0 & 0 \\
0 & 0
\end{matrix} & \omega_0 \mathbf{I}^{-1}
\begin{pmatrix}
I_{yx} & (I_{yy} - I_{zz}) & 2 I_{yz} \\
(I_{zz} - I_{xx}) & -I_{xy} & -2 I_{xz} \\
-I_{yz} & I_{xz} & 0
\end{pmatrix}
\end{bmatrix}
\end{equation}

Basically, it's four smaller matrices combined into one larger one. However, the elements aren't aligned between these matrices. Sorry there's no picture, I don't have the reputation yet to include one.

share|improve this question
    
Welcome to TeX.sx! :). As new user without image posting privileges simply include the image as normal and remove the ! in front of it to turn it into a link. A moderator or another user with edit privileges can then reinsert the ! to turn it into an image again. –  texenthusiast Apr 2 '13 at 16:30
1  
Are seven rows on the left side and only six on the right side correct? –  egreg Apr 2 '13 at 16:42
    
Welcome to TeX.SX. Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say "thank you" to users who helped you. –  Claudio Fiandrino Apr 2 '13 at 16:50
add comment

1 Answer

\documentclass{article}
\usepackage{amsmath}
\usepackage{scalerel}
\begin{document}

Original:

\begin{equation}
\begin{bmatrix}
\begin{matrix}
0 & 0 \\
0 & \omega_0 \\
-\omega_0 & 0 \\
0 & 0
\end{matrix} &
\begin{matrix}
-\frac{p_1}{2} & -\frac{p_2}{2} & 0 \\
0 & 0 & \frac{p_2}{2} \\
-\frac{p_2}{2} & \frac{p_1}{2} & 0 \\
\end{matrix} \\
\begin{matrix}
0 & 0 \\
0 & 0 \\
0 & 0
\end{matrix} & \omega_0 \mathbf{I}^{-1}
\begin{pmatrix}
I_{yx} & (I_{yy} - I_{zz}) & 2 I_{yz} \\
(I_{zz} - I_{xx}) & -I_{xy} & -2 I_{xz} \\
-I_{yz} & I_{xz} & 0
\end{pmatrix}
\end{bmatrix}
\end{equation}

Revised:

\def\x{\begin{array}{c} x\\x\\x\end{array}}

\begin{equation}
\begin{bmatrix}
\begin{array}{c}
0 \\ 0 \\ -\omega_0 \\ 0 \\0 \\0 \\0 \\
\end{array}
 &
\begin{array}{c@{\hspace{0ex}}}
0 \\ \omega_0 \\ 0 \\ 0 \\0 \\0 \\0 \\
\end{array}
&
\begin{array}{@{\hspace{0ex}}c}
 \\ \\ \\ \\ \\ \omega_0 \mathbf{I}^{-1} \\ \\
\end{array}
\begin{array}{@{\hspace{0ex}}c@{\hspace{0ex}}}
\\ \\ \\ \\ \scalerel*[1.8ex]{(}{\x} \\
\end{array}
&
\begin{array}{@{\hspace{0ex}}c}
-p_1/2 \\ 0 \\ -p_2/2 \\ \\ I_{yx} \\(I_{zz} - I_{xx}) \\ -I_{yz} \\
\end{array}
&
\begin{array}{c}
-p_2/2 \\ 0 \\ p_1/2 \\ \\ (I_{yy} - I_{zz}) \\ -I_{xy} \\ -I_{xz} \\
\end{array}
&
\begin{array}{c@{\hspace{0ex}}}
0 \\p_2/2 \\ 0 \\ \\ 2I_{yz} \\ -2I_{xz} \\ 0 \\
\end{array}
&
\begin{array}{@{\hspace{0ex}}c@{\hspace{0ex}}}
\\ \\ \\ \\ \scalerel*[1.8ex]{)}{\x} \\
\end{array}
\end{bmatrix}
\end{equation}

\end{document}

enter image description here

share|improve this answer
    
As egreg pointed out, I am indeed missing a row in the top right quadrant, but the solution provided by Mr. Segletes should do the trick with a little modification! –  user2236918 Apr 7 '13 at 16:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.