A MWE:
\documentclass[12pt]{book}
\usepackage{imakeidx}
\usepackage{xcolor}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage[margin=.5in]{geometry}
\usepackage{parskip}
\usepackage{bookmark}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{float}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{accents}
\usepackage{bm}
\usepackage{amsfonts}
\usepackage{enumitem}
\usepackage{fancyvrb}
\usepackage[bottom]{footmisc}
\makeindex
\usepackage{hyperref}
\begin{document}
We know that the \textbf{dual} of $\mathbf{a_1}$ is ${\mathbf{a_1}^\perp}$
We know that the \textbf{dual} of $\mathbf{a_1}$ is {${\mathbf{a_1}}^\perp$}
\end{document}
Having just learnt to use math mode I have the following problem:
We know that the \textbf{dual} of $\mathbf{a_1}$ is ${\mathbf{a_1}^\perp}$
Results in an error "Mathbf only allowed in math mode". I have tried some variations that give me the error "insert } missing" as follows:
We know that the \textbf{dual} of $\mathbf{a_1}$ is {${\mathbf{a_1}}^\perp$}
I definitely do not understand the placement of the $ signs around math symbols. Any pointers?

mathtoolsis loaded,amsmathis not needed .. and other things to frown – Apr 21 '16 at 20:52mathtools, nothing more and it works – Apr 21 '16 at 21:02mathtoolsis already there. – AboAmmar Apr 21 '16 at 21:04$signs around math: the first$enters math mode. provided that any braced groups within the math are closed (i.e., every open brace is matched by a closing brace) the next$will terminate the math. no additional braces are needed, either inside or outside the$signs to delineate the math. – barbara beeton Apr 21 '16 at 21:08