3

I am trying to write a matrix form of Ax=b, just by putting every letter inside a matrix. The output is as I want, but I need to make it more readable, by increasing the size of the pmatrix with every letter in the center !

\begin{equation}
    \begin{pmatrix}
        A
    \end{pmatrix}
     \times
    \begin{pmatrix}
        x
    \end{pmatrix}
    =
    \begin{pmatrix}
        b
    \end{pmatrix}
\end{equation} 
0

2 Answers 2

3

I suppose you could increase the size of the parentheses by inserting typographic struts inside the \pmatrix environments, as is done in the third and fourth equations in the following screenshot.

enter image description here

You didn't specify just how tall the pmatrix-parentheses should be, but I trust that the ones generated by including either \tallstrut or \reallytallstrut are sufficiently tall.

\documentclass{article}
\usepackage{amsmath} % for 'pmatrix' environment
% define two tall typographic struts:
\newcommand\tallstrut{\vphantom{\tfrac{(}{(}}}
\newcommand\reallytallstrut{\vphantom{\dfrac{A}{A}}}

\begin{document}
\[
    \mathbf{Ax}=\mathbf{b} default (?) way of writing matrices and vectors
\qquad
    \begin{pmatrix} A \end{pmatrix} \times
    \begin{pmatrix} x \end{pmatrix} =
    \begin{pmatrix} b \end{pmatrix}
\qquad
    \begin{pmatrix} A\tallstrut \end{pmatrix} \times
    \begin{pmatrix} x\tallstrut \end{pmatrix} =
    \begin{pmatrix} b\tallstrut \end{pmatrix}
\qquad
    \begin{pmatrix} A\reallytallstrut \end{pmatrix} \times
    \begin{pmatrix} x\reallytallstrut \end{pmatrix} =
    \begin{pmatrix} b\reallytallstrut \end{pmatrix}
\]
\end{document}
0
5

Here's a solution using nicematrix and the Block macro.

MWE:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{nicematrix}

\begin{document}
\begin{equation*}
\begin{pNiceMatrix}[columns-width = 1em]
    \Block{3-3}<\LARGE>{A}\\
     & & \\
     & &
\end{pNiceMatrix}
\begin{pNiceMatrix}[columns-width = 1em]
    \Block{3-1}<\LARGE>{x}\\
    \ \\
    \ 
\end{pNiceMatrix}
=
\begin{pNiceMatrix}[columns-width = 1em]
    \Block{3-1}<\LARGE>{b}\\
    \ \\
    \ 
\end{pNiceMatrix}
\end{equation*}
\end{document}

Output: The LaTeX output

0

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.