Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The below sum expression inside the equation throws an undefined control sequence error.

\begin{equation}
    \left\|x\left[t\right]-\textbf{1} F(X)\right\|^2 = \sum_{i = 1}^{n} \lambda_i^2t     \lvert x \left[ 0 \right] \rvert^2
\end{equation}

Error:

Undefined control sequence.

|^2 = \sum_{i = 1}^{n} \lambda_i^2t \lvert 
                                        x \left[ 0 \right] \rvert^2

My guess is I am doing something wrong with the \lvert or \lambda. Don't know exactly. Any suggestion on how to solve this issue will be very helpful.

share|improve this question
    
Welcome to TeX.SE. It is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. –  Peter Grill May 21 '12 at 17:36

1 Answer 1

up vote 4 down vote accepted

You need to include \usepackage{amsmath}. The MWE below produces:

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
    \left\|x\left[t\right]-\textbf{1} F(X)\right\|^2 = \sum_{i = 1}^{n} \lambda_i^2t     \lvert x \left[ 0 \right] \rvert^2
\end{equation}
\end{document}
share|improve this answer
    
Hi Peter, after including amsmath package, that problem is resolved but a new message is coming up "Package amsmath Error: Erroneous nesting of equation structures (amsmath) trying to recover with `aligned'." Any idea on why this is happening will be helpful. –  Somnath Chakrabarti May 21 '12 at 17:38
    
@SomnathChakrabarti: Check whether you've inadvertently created nested equation environments. –  Mico May 21 '12 at 18:01
    
As I suggested in the comments, please compose a fully compilable MWE that reproduces the problem including the \documentclass. –  Peter Grill May 21 '12 at 18:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.