8

I am trying to make the following matrix bigger since the elements do not fit quite well inside of it. I don't know why..

\documentclass[11pt,a4paper,oneside]{report} % KOMA-Script book
\usepackage[pdftex]{graphicx} % to work with PDFLaTex
\usepackage[T1]{fontenc} 
\usepackage{fouriernc}
\usepackage{amsfonts,amsmath,amssymb,amsthm}
\usepackage[a4paper, hmargin={3.5cm,3cm}, vmargin={2.5cm,2.5cm}]{geometry} % margin
\usepackage{multicol}
\usepackage{chngcntr} % added to reset footnote for each chapter
\counterwithout{footnote}{chapter}%added to reste footnote for each chapter 
\usepackage{fancyhdr} 
\usepackage{enumerate}
%\counterwithout{equation}{chapter} % undo numbering system provided by phstyle.cls
\usepackage{wasysym} % symbols
\usepackage[hang]{footmisc} %to align text of footnotes 

\begin{document} 
Unscalled matrix
\begin{equation*}
\begin{bmatrix}
a_{1}&u_{2}&\frac{a_{1}}{d}u_{3}\\[6pt]
a_{2}&u_{1}&\frac{a_{2}}{d}u_{3}\\[6pt]
a_{3}&0&u_{4}\\[6pt]
\end{bmatrix}
\end{equation*} 

and rescalled..a bit ugly..
\begin{equation*}
\scalebox{2.4}{\Bigg[}\begin{matrix}
a_{1}&u_{2}&\frac{a_{1}}{d}u_{3}\\[6pt]
a_{2}&u_{1}&\frac{a_{2}}{d}u_{3}\\[6pt]
a_{3}&0&u_{4}\\[6pt]
\end{matrix}
\scalebox{2.4}{\Bigg]}
\end{equation*}

also this one
\begin{equation*}
\begin{vmatrix}
1&z&x^2r+y^2t+z^2+2xys\\0&x&x^2b+y^2d+2zx\\0&y&x^2a+y^2c+2zy
\end{vmatrix}
\end{equation*}
\end{document}

and the output... enter image description here

Thank you

2 Answers 2

9

You could change \arraystretch. I think the following both look fine:

\renewcommand\arraystretch{1.2}
\begin{equation*}
\begin{bmatrix}
a_{1}& u_{2}& \frac{a_{1}}{d}u_{3}\\
a_{2}& u_{1}& \frac{a_{2}}{d}u_{3}\\
a_{3}& 0& u_{4}
\end{bmatrix}
\qquad
\begin{vmatrix}
1& z& x^2r+y^2t+z^2+2xys\\
0& x& x^2b+y^2d+2zx\\
0& y& x^2a+y^2c+2zy
\end{vmatrix}
\end{equation*} 

Another possibility is \delimitershortfall=0pt This parameter tells TeX how much shorter than the height of the contents the braces are allowed to be. Normally, it is 5pt and so the braces are permitted to be shorter than the matrix contents by 5 points. It can be made negative to force the braces to be stictly taller than the contents.

A third possibility is to put a \strut on the first row or anything invisible but tall such as \rule{0pt}{12pt}.

2
  • Thanks for the \renewcommand\arraystretch{1.2} suggestion. It worked. But, I don't want to use it for all the matrices in my document. How can I stop it's effect? Commented Nov 20, 2021 at 20:45
  • @SayanDutta - To localize the scope of a TeX instruction (here: \renewcommand\arraystretch{1.2}), I suggest you insert \begingroup immediately before that instruction and \endgroup where you want its scope to end (here: \end{equation*}).
    – Mico
    Commented Jul 13 at 5:29
7

I'm not entirely sure I understand your objective. For now, I assume that by "bigger" you mean larger, i.e., "display-style" fractions.

Since you're already loading the amsmath package, I suggest you use \dfrac instead of \frac. To add extra vertical space, you might start with [2ex]; you're obviously free to change this to suit your preferences.

enter image description here

\documentclass[11pt,a4paper,oneside]{report}
\usepackage[T1]{fontenc} 
\usepackage{fouriernc}
\usepackage{amsfonts,amsmath,amssymb,amsthm}
\usepackage[hmargin={3.5cm,3cm}, vmargin={2.5cm,2.5cm}]{geometry}

\begin{document} 
Using \verb+\frac+ and default amount of vertical spacing:
\begin{equation*}
\begin{bmatrix}
a_{1}&u_{2}&\frac{a_{1}}{d}u_{3}\\
a_{2}&u_{1}&\frac{a_{2}}{d}u_{3}\\
a_{3}&0&u_{4}
\end{bmatrix}
\end{equation*} 

Using \verb+\dfrac+ and some extra vertical spacing:
\begin{equation*}
\begin{bmatrix}
a_{1}&u_{2}&\dfrac{a_{1}}{d}u_{3}\\[2ex]
a_{2}&u_{1}&\dfrac{a_{2}}{d}u_{3}\\[2ex]
a_{3}&0&u_{4}
\end{bmatrix}
\end{equation*} 

\end{document}
3
  • 1
    Well you see clearly that elements of the matrix do not fit inside of it. In both cases the element of the first row and the third column ''sticks out''.
    – user124471
    Commented Aug 14, 2014 at 7:39
  • @user124471 - thanks for providing this clarification.
    – Mico
    Commented Aug 14, 2014 at 13:05
  • 2
    That's great! Thanks a lot for the \dfrac suggestion! It's exactly what I was looking for. Commented Jun 28, 2017 at 13:00

You must log in to answer this question.

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