I'm trying to get

    \cos(A) &= \cos(SDS^{-1}) \\
    &= \sum\limits_{n=0}^\infty \frac{[SDS^{-1}]^n}{n!} \\
    &= I-\frac{\left(SDS^{-1}       \right)^2}{2!}+\frac{(SDS^{-1})^4}{4!}-... 

to work properly, but I keep getting errors such as "misplaced alignment tab character" and enviornment align undefined.

  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That makes it a lot easier for people to understand your question and provide answers which are actually helpful to you. Note that you can format code as code by indenting 4 spaces (easy way: highlight and press '{}' button). – cfr Nov 9 '14 at 21:01
  • @Mico Why does the system count the question as being edited twice despite the fact that your edit made no changes to either content or tags? (I must have been ever so slightly faster doing precisely the same things.) – cfr Nov 9 '14 at 21:03
  • 3
    Did you remember to load the amsmath package (or the mathtools package) in the preamble of your document? The amsmath package defines the align* environment; if you don't load it, you'll get the error messages you report. – Mico Nov 9 '14 at 21:05
  • @cfr - Indeed, we must have been to make the exact same edits, with you being a few seconds quicker than me... :-) – Mico Nov 9 '14 at 21:06
  • @Mico Your description of the edit was better than mine, though ;). – cfr Nov 9 '14 at 21:10

(Too long for a comment, hence posted as an answer.)

The following, slightly expanded form of your posting compiles just fine:

    \cos(A) &= \cos(SDS^{-1}) \\
    &= \sum\limits_{n=0}^\infty \frac{[SDS^{-1}]^n}{n!} \\
    &= I-\frac{(SDS^{-1})^2}{2!}+\frac{(SDS^{-1})^4}{4!}-\dots

However, if I leave off the instruction \usepackage{amsmath}, I get the following error message:

LaTeX Error: Environment align* undefined.

This appears to be the error message (or one of the error messages) you report encountering.

In short: Did you remember to load the amsmath package, either directly, as in the example above, or indirectly, via a statement such as \usepackage{mathtools}?

| improve this answer | |

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.