Graphics, Figures & Tablesadjusting array height

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ge0rge04
Posts: 10
Joined: Sun Mar 28, 2010 12:23 am

adjusting array height

Post by ge0rge04 »

Hello.
Could you tell me how can i make the first matrix look like the second one, using array command?
n6qfck.png
n6qfck.png (8.1 KiB) Viewed 1902 times
this is what i was able to write for the first one

Code: Select all

$$F(x)=\left(
\begin{array}{cc}
\frac{x}{2} & 0 \\
0 & x^2\\
\end{array}\right)$$
Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

adjusting array height

Post by gmedina »

Hi,

perhaps something like the following?

Code: Select all

\documentclass{article}
\usepackage {amsmath}

\begin{document}

\[
  F(x)=\left(\negthickspace
  \begin{array}{cc}
  \\[-6pt]
  \dfrac{x}{2} & 0 \\[6pt]
  0 & x^2\\[2pt]
  \end{array}\negthickspace\right)
\]

\end{document}
By the way, the construct $$...$$ is obsolete and shouldn't be used anymore (reasons can be found in l2tabu.)
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply