1

In fact I want to have these two matrices side by side, here is the code:

\immediate\write18{makeindex \jobname.nlo -s nomencl.ist -o \jobname.nls}
\documentclass[10pt]{elsarticle}
\DeclareGraphicsExtensions{.pdf,.gif,.jpg}

\usepackage{lineno}
\modulolinenumbers[5]
\usepackage{graphicx}
\usepackage{amssymb,amsmath,nccmath}
\usepackage{cclicenses}
\usepackage{makecell}
\usepackage{lscape,array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} 
\usepackage[thin, , thinc]{esdiff}
\usepackage{subcaption}
\usepackage{caption}
\usepackage{framed}  
\usepackage{nomencl} 
\usepackage[hmargin=2.6 cm,vmargin=3.25cm]{geometry}
\usepackage{setspace}\doublespacing
\usepackage[font=small,skip=0pt]{caption}
\makenomenclature
\setlength{\nomitemsep}{-\parskip}\usepackage{booktabs,multirow}
\renewcommand{\cellset}{\renewcommand{\arraystretch}{0.5}}


\journal{Journal of \LaTeX\ Templates}

\bibliographystyle{elsarticle-num}
\begin{document}
\begin{align*}
\begin{bmatrix}
1
\end{bmatrix}
=
\begin{bmatrix}
\mfrac{A}{B} &  E & \mfrac{C}{D} & 0 \\
-K &  \mfrac{-Z}{Y} & T & \mfrac{W}{V} \\
\mfrac{XY}{MOP}& -\mfrac{US}{TV} & \mfrac{1}{B}(\mfrac{MN}{AB}-\mfrac{LA} 
{BC}) & RR \\
\mfrac{A}{B} & \mfrac{C}{D} & -E & \mfrac{1}{C}(\mfrac{DE}{GH}-\mfrac{IJ} 
{KL})  \\
\end{bmatrix}
\end{align*}

\begin{align*}
\begin{bmatrix}
 2
\end{bmatrix}
 =
\begin{bmatrix}
A & 0 & 0 & 0\\
0 & A & 0 & 0\\
\mfrac{AA}{BB} & 0 & \mfrac{1}{CCr} & 0 \\ 
0 & \mfrac{-DE}{BCD} & 0 & \mfrac{1}{FG} 
\end{bmatrix}
\end{align*}\par
\end{document}
  • 1
    Just replace \end{aling*} \begin{align*} between these equations by ,\quad. – marmot Aug 10 '18 at 14:15
  • I didn't understand @marmot – kerdouj kardouj Aug 10 '18 at 14:20
  • Try \begin{align*} \begin{bmatrix} 1 \end{bmatrix} = \begin{bmatrix} \mfrac{A}{B} & E & \mfrac{C}{D} & 0 \\ -K & \mfrac{-Z}{Y} & T & \mfrac{W}{V} \\ \mfrac{XY}{MOP}& -\mfrac{US}{TV} & \mfrac{1}{B}(\mfrac{MN}{AB}-\mfrac{LA} {BC}) & RR \\ \mfrac{A}{B} & \mfrac{C}{D} & -E & \mfrac{1}{C}(\mfrac{DE}{GH}-\mfrac{IJ} {KL}) \\ \end{bmatrix} ,\quad \begin{bmatrix} 2 \end{bmatrix} = \begin{bmatrix} A & 0 & 0 & 0\\ 0 & A & 0 & 0\\ \mfrac{AA}{BB} & 0 & \mfrac{1}{CCr} & 0 \\ 0 & \mfrac{-DE}{BCD} & 0 & \mfrac{1}{FG} \end{bmatrix} \end{align*} ... – marmot Aug 10 '18 at 14:25
  • 1
    ... it is however unclear to me whether it is really better to write \begin{bmatrix} 1 \end{bmatrix} as opposed to simply [1]. – marmot Aug 10 '18 at 14:26
2

very similar to what suggested marmotin his comments above:

\documentclass[10pt]{elsarticle}
\usepackage[hmargin=2.6 cm,
            vmargin=3.25cm]{geometry}
\usepackage{amssymb, nccmath}

\begin{document}
\[\renewcommand\arraystretch{2}
[1] = \begin{bmatrix}
        \mfrac{A}{B}    &  E                & \mfrac{C}{D}  & 0 \\
                -K      &  \mfrac{-Z}{Y}    & T             & \mfrac{W}{V} \\
        \mfrac{XY}{MOP} & -\mfrac{US}{TV}   & \mfrac{1}{B}\left(\mfrac{MN}{AB}-\mfrac{LA}{BC}\right)
                                                            & RR \\
        \mfrac{A}{B}    & \mfrac{C}{D}      & -E            & \mfrac{1}{C}\left(\mfrac{DE}{GH}-\mfrac{IJ}{KL}\right)  \\
\end{bmatrix},
    \qquad
[2] = \begin{bmatrix}
        A               & 0                 & 0                 & 0 \\
        0               & A                 & 0                 & 0 \\
        \mfrac{AA}{BB}  & 0                 & \mfrac{1}{CCr}    & 0 \\
        0               & \mfrac{-DE}{BCD}  & 0                 & \mfrac{1}{FG}
\end{bmatrix}
\]

enter image description here

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.