What is faulty in this LaTeX Code?

Consider the following code:

\begin{figure}[hbtp]
\centering
\fbox{\includegraphics[trim=2 0 0 0,width=\textwidth]{"Main Picture".jpg}}
\caption{Geometric Setup used for the proof of Theorem 1}
\end{figure}


When I execute this code by clicking "QuickBuild" in TeX editor I get the following errors:

1. ! Undefined control sequence.
2. ! Missing number treated as zero.
3. ! Illegal unit of measure (pt inserted).

A rough sketch of my entire code is given for reference:

\documentclass[10 pt,a4paper,twoside,reqno]{amsart}
\usepackage{amsfonts,amssymb,amscd,amsmath,enumerate,verbatim,calc}
\renewcommand{\baselinestretch}{1.2}
\textwidth = 12.5 cm
\textheight = 20 cm
\topmargin = 0.5 cm
\oddsidemargin = 1 cm
\evensidemargin = 1 cm
\pagestyle{plain}

\newtheorem{theorem}{Theorem}
\newtheorem{definition}{Definition}

\begin{document}

\begin{titlepage}
\vfill
\centering
{\Huge On the Reflection Property of a Pararbolid}\\[1cm]
{\Large Shrey Aryan}\\[0.6cm]
XYZ University, ABC Country

Email:183@gmail.com
\vfill
\end{titlepage}

\section{abstract}
Some Text....

\section{Introduction}
Some Text.....

\section{Preliminary}
Some Text.....

\begin{figure}[hbtp]
\centering
\fbox{\includegraphics[trim=2 0 0 0,width=\textwidth]{"Main Picture".jpg}}
\caption{Geometric Setup used for the proof of Theorem 1}
\end{figure}

\section{Main Result}
Some Text....

section{References}
Some Text....

\end{document}

• Try adding \usepackage{graphicx} to your preamble. The command \includegraphics is part of the graphicx package. – Christian Sep 25 '16 at 10:56
• @Christian thank you so much! It worked. Please write this as an answer so that I can accept it. – model_checker Sep 25 '16 at 11:02

The problem in your code is that your are using the \includegraphics command without loading a package where it is defined. This is what the error message
Undefined control sequence.

means. The solution is to load the package graphicx which contains a definition of \includegraphics. You do this by adding \usepackage{graphicx} to the preamble of your document.