To negate the \perp
(perpendicular) symbol, the command \not\perp
provides a simple solution, but this negated symbol doesn't look that great IMHO:

If you load the mathabx
package, you get the command \notperp
which looks pretty good, as does now the output of \not\perp
. The same effect can be achieved if you load either the MnSymbol
package or the fdsymbol
package and use the command \notperp
(same name used by both packages). Notice, though, that even if you load the MnSymbol
of the fdsymbol
package, the output of \not\perp
still looks pretty bad, i.e., as bad as if you hadn't loaded any extra package at all.
Addendum: Following a request by the OP, here's an MWE that shows how to load the mathabx
package and generate the symbol using the package's \notperp
macro, as well as with \not\perp
"
\documentclass{article}
\usepackage{mathabx}
\begin{document}
$a \notperp b$, $c \not\perp d$
\end{document}

Next, here's an MWE that shows the use of the MnSymbol
package to generate these symbols:
\documentclass{article}
\usepackage{MnSymbol}
\begin{document}
$a \nperp b$, $c \not\perp d$
\end{document}

Finally, with the use of the fdsymbol
package and its \nperp
macro:
\documentclass{article}
\usepackage{fdsymbol}
\begin{document}
$a \nperp b$, $c \not\perp d$
\end{document}

Happy TeXing!
You can use a combination of \stackrel
and \mathclap
(from the mathtools
package):
\documentclass{article}
\usepackage{mathtools}
\newcommand\myeq{\stackrel{\mathclap{\normalfont\mbox{def}}}{=}}
\begin{document}
\begin{align*}
a &\myeq b \\
&=c \\
&= d.
\end{align*}
\end{document}

If using mathtools
is not an option, you can use a \makebox
of width 0pt
:
\documentclass{article}
\usepackage{amsmath}
\newcommand\myeq{\mathrel{\stackrel{\makebox[0pt]{\mbox{\normalfont\tiny def}}}{=}}}
\begin{document}
\begin{align*}
a &\myeq b \\
&=c \\
&= d.
\end{align*}
\end{document}

Even better, if amsmath
has been loaded, is to use \overset
instead of \stackrel
; a little example using \tiny\sffamily
for "def" :
\documentclass{article}
\usepackage{amsmath}
\newcommand\myeq{\mathrel{\overset{\makebox[0pt]{\mbox{\normalfont\tiny\sffamily def}}}{=}}}
\begin{document}
\begin{align*}
a &\myeq b \\
&=c \\
&= d.
\end{align*}
\end{document}

Inside the argument for \mbox
one can use some of the font modifiers, as I did in my second and third examples.
Particularly, I don't like this kind of notation (it's not really necessary); you should consider if you really need the text above the equal sign.
Best Answer
Prettiest of all ;-)