4

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:

enter image description here

Thanks in advanced!

  • Welcome to TeX.SE. – Mico Dec 1 '20 at 18:22
4

The amsmath package provides an environment called pmatrix -- short for "matrix surrounded by (round) parentheses", I suppose -- which is perfectly suited for the job.

enter image description here

\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}
1

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}

enter image description here

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.