Math & ScienceMath Mode Issue

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
sergio_6280
Posts: 2
Joined: Mon Mar 04, 2013 7:12 pm

Math Mode Issue

Post by sergio_6280 »

I have the same problem as described here (more or less). I need to write two matrix in a row like (something)=(something else) but I would like also the number of the equation to refer to it with \vref.
I'm using this:

Code: Select all

\begin{equation}
\left( {\begin{array}{*{20}{c}}
A&B\\
C&D
\end{array}} \right) $=$ \left( {\begin{array}{*{20}{c}}
0&{jK}\\
{\frac{1}{jK}}&0
\end{array}} \right)
\end{equation}
but there are these problems:

Code: Select all

Missing $ inserted
Display math should end with $$
Missing $ inserted \left
Missing $ inserted
Bad math environment delimiter. \end{equation}
You can't use `\eqno' in vertical mode \end{equation}
Missing $ inserted \end{equation}
Display math should end with $$ \end{equation}
What is wrong?
Thanks
Last edited by localghost on Wed Mar 06, 2013 6:57 pm, edited 2 times in total.

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Math Mode Issue

Post by localghost »

You should always provide a self-contained and minimal example to give an adequate problem description.

I have some questions.
  • Why do you write $=$ inside a math environment? This causes your problem here.
  • Why do you enclose the {array} in additional curly braces?
  • Why do you use an {array} with 20 columns if you need only two?
The amsmath package (in the below code loaded by mathtools) makes math typesetting easier.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools}  % loads »amsmath«

\begin{document}
  \begin{equation}
    \begin{pmatrix}
      A & B \\
      C & D
    \end{pmatrix}
    =
    \begin{pmatrix}
      0 & jK \\
      \frac{1}{jK} & 0
    \end{pmatrix}
    \end{equation}
\end{document}
For details consult the respective manuals. On the command line you can get instantly.

Code: Select all

texdoc amsmath

Further reading:

Best regards and welcome to the board
Thorsten
sergio_6280
Posts: 2
Joined: Mon Mar 04, 2013 7:12 pm

Re: Math Mode Issue

Post by sergio_6280 »

Sorry for all my mistakes. It was the first time I was asking in this kind of forum. I will try to be more clear next time. Anyway, your code works. So thank you. Thank you also for the link of the "Math mode" guide.
Post Reply