3

I have a problem, in my document I have two sets of similar equations but they do not align.

This is the text:

If $\tilde{\mathbf{p}}$ is first combined with the system of Eq.\ref{inplane:eq7} and then differentiated with respect to time, it yields 
\begin{equation}
\label{4:eq18}
\left[\begin{array}{c}
\dot{p}_{1} \\
\dot{p}_{2} \\
\dot{p}_{3} \\
\dot{p}_{4}
\end{array}\right]
= \omega 
\begin{bmatrix}
0 & 4\sigma-3 & -2(\sigma-1) & 0  \\
2\sigma - 3 & 0 & 0 & 4(\sigma-1) \\
4(\sigma-1) & 0 & 0 & 8\sigma-5 \\
0 & -2(\sigma - 1) & \sigma-1 & 0 
\end{bmatrix}
\left[\begin{array}{c}
p_{1} \\
p_{2} \\
p_{3} \\
p_{4}
\end{array}\right].
\end{equation}
From this system of equations, it is then possible to differentiate even further to a second order system as
\begin{equation}
\label{4:eq19}
\left[\begin{array}{c}
\ddot{p}_{1} \\
\ddot{p}_{2} \\
\ddot{p}_{3} \\
\ddot{p}_{4}
\end{array}\right]
= \omega^{2} 
\begin{bmatrix}
-(2\sigma -1) & 0& 0 & -2(\sigma -1) \\
0 & -(2\sigma -1) & 2(\sigma-1) & 0 \\
0 & -2(\sigma -1) & 3(\sigma-1) & 0 \\
2(\sigma -1) & 0 &0& 3(\sigma-1)
\end{bmatrix}
\left[\begin{array}{c}
p_{1} \\
p_{2} \\
p_{3} \\
p_{4}
\end{array}\right].
\end{equation}
In Eq. \ref{4:eq19}, the variables are coupled again ($p_{1}$ with $p_{4}$ and $p_{2}$ with $p_{3}$). 

I am working in a book environment and I do not have any other problems of this kind in my thesis. In the image you can see what's actually going on. Any help is appreciated! Thanks

Equations misalignment.

  • 1
    Welcome to SE! How you like to have aligned? The equation is not equal (have different width), so they align in text had to be different. – Zarko Feb 12 '16 at 11:30
  • 1
    Thanks for your welcoming message! :) I know they have different width but the equations should be both centred, and they do not look centred to me; the second one looks like it is pushed on the left... – Eli Feb 12 '16 at 11:33
  • 2
    Welcome to TeX.SX!! It is better to post a full minimal working example that starts with a \documentclass command, has a minimal preamble and then \begin{document}...\end{document}. Unless the problem is a compilation error, the code should compile and be as small as possible to demonstrate your problem. This makes it much easier for people to help you --- and much ore likely that they will! – Andrew Feb 12 '16 at 11:59
3

When I compile the OP's snippet, I do not get the left/right offset that is shown in his image. The OP will need to provide a complete working example to demonstrate the problem.

When I wrap the OP's provided code in a document with amsmath, I get this image:

enter image description here

which is centered, but of uneven width. One thing that can be done is to redefine the length \arraycolsep in the second equation to 3.9pt. When that is done, the two equations end up a similar width.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

If $\tilde{\mathbf{p}}$ is first combined with the system of Eq.\ref{inplane:eq7} and then differentiated with respect to time, it yields 
\begin{equation}
\label{4:eq18}
\left[\begin{array}{c}
\dot{p}_{1} \\
\dot{p}_{2} \\
\dot{p}_{3} \\
\dot{p}_{4}
\end{array}\right]
= \omega 
\begin{bmatrix}
0 & 4\sigma-3 & -2(\sigma-1) & 0  \\
2\sigma - 3 & 0 & 0 & 4(\sigma-1) \\
4(\sigma-1) & 0 & 0 & 8\sigma-5 \\
0 & -2(\sigma - 1) & \sigma-1 & 0 
\end{bmatrix}
\left[\begin{array}{c}
p_{1} \\
p_{2} \\
p_{3} \\
p_{4}
\end{array}\right].
\end{equation}
From this system of equations, it is then possible to differentiate even further to a second order system as
\begin{equation}
\label{4:eq19}
\arraycolsep3.9pt
\left[\begin{array}{c}
\ddot{p}_{1} \\
\ddot{p}_{2} \\
\ddot{p}_{3} \\
\ddot{p}_{4}
\end{array}\right]
= \omega^{2} 
\begin{bmatrix}
-(2\sigma -1) & 0& 0 & -2(\sigma -1) \\
0 & -(2\sigma -1) & 2(\sigma-1) & 0 \\
0 & -2(\sigma -1) & 3(\sigma-1) & 0 \\
2(\sigma -1) & 0 &0& 3(\sigma-1)
\end{bmatrix}
\left[\begin{array}{c}
p_{1} \\
p_{2} \\
p_{3} \\
p_{4}
\end{array}\right].
\end{equation}
In Eq. \ref{4:eq19}, the variables are coupled again ($p_{1}$ with $p_{4}$ and $p_{2}$ with $p_{3}$). 
\end{document}

enter image description here

  • 1
    Thank you for your answer, I have already amsmath set in the header of my file, but I am not sure why I obtain a different result, compared to your first one. In any case your answer looks brilliant to me, thanks for your help! – Eli Feb 12 '16 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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