2

I have the following matrix equation written in latex.

\documentclass[a4paper, 12 pt]{report}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[top=1in, bottom=1in, left=1.5in, right=1in]{geometry}
\begin{document}

   \[
\begin{bmatrix}
   \frac{-\beta_2}{\bx} & \frac{\beta_1}{\bx} \\
   \addlinespace
   -\frac{1}{\bx} & \frac{1}{\bx}
\end{bmatrix}
\begin{bmatrix} 
   1 & -\beta_1 \\ 
   1 & -\beta_2 
\end{bmatrix}
\begin{bmatrix} 
   \mathrm{q}_t \\ \mathrm{p}_t 
\end{bmatrix} 
+
\begin{bmatrix}
   \frac{-\beta_2}{\bx} & \frac{\beta_1}{\bx} \\
   \addlinespace
   -\frac{1}{\bx} & \frac{1}{\bx}
\end{bmatrix}
\begin{bmatrix}
   -\alpha_1 & -\gamma_1 & 0 \\
   -\alpha_2 & 0 & -\gamma_2
\end{bmatrix}
\begin{bmatrix}
   1 \\ \mathrm{i}_t \\ \mathrm{r}_t 
\end{bmatrix}
=
\begin{bmatrix}
   \frac{-\beta_2}{\bx} & \frac{\beta_1}{\bx} \\
   \addlinespace
   -\frac{1}{\bx} & \frac{1}{\bx}
\end{bmatrix}
\begin{bmatrix}
   \varepsilon_{1t} \\ \varepsilon_{2t} 
\end{bmatrix}
\]

\end{document}

The output is provided below. This does not appear in one line. How can I make it smaller such that it appears in one line?

enter image description here

2
  • you have not provided an example we can test, in particular we do not know how big the line is. But note you are forcing over-large fractions by using dfrac rather than frac Dec 5, 2020 at 13:17
  • I have edited the codes.
    – vahis100
    Dec 5, 2020 at 13:36

1 Answer 1

2

I suggest you replace the fraction terms with simpler terms, such as \kappa_0, \kappa_1, and \kappa_2.

enter image description here

\documentclass{article}
\usepackage[margin=2.5cm]{geometry} % set textblock parameters suitably
\usepackage{amsmath} % for 'bmatrix' env.
\begin{document}
Put $\kappa_0=1/(\beta_1-\beta_2)$, $\kappa_1=\beta_1/(\beta_1-\beta_2)$, 
and $\kappa_2=\beta_2/(\beta_1-\beta_2)$. Then
\[
\begin{bmatrix}
   -\kappa_2 & \kappa_1 \\
   -\kappa_0 & \kappa_0
\end{bmatrix}
\begin{bmatrix} 
   1 & -\beta_1 \\ 
   1 & -\beta_2 
\end{bmatrix}
\begin{bmatrix} 
   \mathrm{q}_t \\ \mathrm{p}_t 
\end{bmatrix} 
+
\begin{bmatrix}
   -\kappa_2 & \kappa_1 \\
   -\kappa_0 & \kappa_0
\end{bmatrix}
\begin{bmatrix}
   -\alpha_1 & -\gamma_1 & 0 \\
   -\alpha_2 & 0 & -\gamma_2
\end{bmatrix}
\begin{bmatrix}
   1 \\ \mathrm{i}_t \\ \mathrm{r}_t 
\end{bmatrix}
=
\begin{bmatrix}
   -\kappa_2 & \kappa_1 \\
   -\kappa_0 & \kappa_0
\end{bmatrix}
\begin{bmatrix}
   \varepsilon_{1t} \\ \varepsilon_{2t} 
\end{bmatrix}\,.
\]

\end{document}
1
  • 1
    This solution also has the advantage to simplify the human analysis of the calculus.
    – projetmbc
    Dec 5, 2020 at 13:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .