[Tex/LaTex] Bad math environment delimiter. \mathcal{K} = \[

amsmathdelimitersequationsmath-mode

I'm getting this error, please help me fix it.
here's my code :

    \begin{equation}
    \label{eq:4}
    \mathcal{K} = \[\frac{A}{B}\]
    \end{equation}

Best Answer

\begin{equation} is already in math mode, so \[ and \] are unnecessary.

Just use:

 \begin{equation}
    \label{eq:4}
    \mathcal{K} = \frac{A}{B}
 \end{equation}

Edit: As Henri said you can use \left[ and \right] if you want brackets.