I would like to know how it is possible to put matrices and determinants inside equations. In particular I would like to know how to generate the following equality:
Thanks in advanced!
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI would like to know how it is possible to put matrices and determinants inside equations. In particular I would like to know how to generate the following equality:
Thanks in advanced!
The amsmath
package provides an environment called pmatrix
-- short for "matrix surrounded by (round) parentheses", I suppose -- which is perfectly suited for the job.
\documentclass{beamer}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{frame}
\[
\det
\begin{pmatrix}
\lambda & -1 \\
q & \lambda+p
\end{pmatrix}
=0
\quad \Leftrightarrow \quad
\lambda^2+p\lambda+q=0
\]
\end{frame}
\end{document}
If you want just one part of your formula using the article
class, it is possible, for example to use, sansmath
package, within the enviroment,
\begin{sansmath}
....
....
\end{sansmath}
Here there is a small example,
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{sansmath}
\begin{document}
This text it is written with the Computer Modern font.
\begin{sansmath}
\[\det
\begin{pmatrix}
\lambda & -1\\
q & \lambda+p
\end{pmatrix}
=0 \iff \lambda^2+p\lambda+q=0
\]
\end{sansmath}
After you have the same initial font.
\end{document}