1
\documentclass{article}
\usepackage{mathtools}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
R = \left(\begin{array}{cc} cos \theta & -sin\theta \\ sin\theta & cos\theta\end{array}\right) \hspace{45 pt}\mbox{The rotation matrix}
\end{equation*}
\begin{equation*}
yA = \left(\begin{array}{cc} ya & yb \\ yc & yd\end{array}\right) \hspace{45 pt}\mbox{Scaling $A$ by $y$}
\end{equation*}

\end{document}
  • Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. I don't think anyone likes typing the code from your image... – someonr Nov 28 '13 at 2:26
  • 5
    I think this is the second question you are asking like this with a screen shot. Kindly consider posting minimal (but complete) code. – user11232 Nov 28 '13 at 2:26
  • @someonr: it's more about finding the problem than it is solving it for me...but ok! :) – Jossie Nov 28 '13 at 2:28
  • @Jossie Please use code tags and this isn't a MWE. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to help you. Help them help you: remove that one hurdle between you and a solution to your problem (or finding it ;) ). It might also help to specify the question more exactly. Are you looking for an advice for formatting the formular? – someonr Nov 28 '13 at 2:29
  • @Jossie: What do you want to align? You just ask "How can I align this?" What does "this" refer to? The = signs? – Werner Nov 28 '13 at 2:35
5

Lines of your example commented and changed for the more TeX-like behaviour.

\documentclass{article}
\usepackage{mathtools}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}

\begin{document}

%\begin{equation*}
\begin{align}
%R = \left(\begin{array}{cc} cos \theta & -sin\theta \\ sin\theta & cos\theta\end{array}\right) \hspace{45 pt}\mbox{The rotation matrix}
R &= \left(\begin{array}{rr} \cos \theta & -\sin\theta \\ \sin\theta & \cos\theta\end{array}\right) &\mbox{The rotation matrix}\\
%\end{equation*}
%\begin{equation*}
%yA = \left(\begin{array}{cc} ya & yb \\ yc & yd\end{array}\right) \hspace{45 pt}\mbox{Scaling $A$ by $y$}
yA &= \left(\begin{array}{cc} ya & yb \\ yc & yd\end{array}\right) 
&\mbox{Scaling $A$ by $y$}
%\end{equation*}
\end{align}

\end{document}  

enter image description here

Explanation. Separated equations have no kowledge of aligning of each other. When you choosee amsmath package, align & Co. is the main solution during aligning, as the name states.

If you want also to correct of vertical space between (1) and (2), you can try to use, e.g., \\[6pt] in the proper place.

  • Wouldn't you want to align at the =? – Sean Allred Nov 28 '13 at 2:50
  • @SeanAllred Oh, oh! Correcting... – Przemysław Scherwentke Nov 28 '13 at 2:52
  • @SeanAllred Corrected. Thank you! To many changes = additional mistakes. :-( – Przemysław Scherwentke Nov 28 '13 at 2:59
  • 1
    @KevinC You are right, but OP is rather a beginner. Proper usage of \cos, \sin and array will be enough. – Przemysław Scherwentke Nov 28 '13 at 4:47
  • 1
    @KevinC -- and \text{...}would be even better than \mbox. – barbara beeton Nov 28 '13 at 16:48

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.