I am studying the phasor method for solving electrical circuits. Have tried using tables and researched a lot on the internet but have not found a simple command to represent the numbers a and b in the diagram below:

Thanks for any help.
I am studying the phasor method for solving electrical circuits. Have tried using tables and researched a lot on the internet but have not found a simple command to represent the numbers a and b in the diagram below:

Thanks for any help.
If it is simply a diagram, you can use a tabular.
\documentclass{article}
\newcommand\Phasor[2]{%
\setlength\tabcolsep{2pt} %% change 2pt suitably
\begin{tabular}{c|c}
#1 & #2 \\\cline{2-2}
\end{tabular}
}
\begin{document}
This is \Phasor{a}{b} well a phasor.
\end{document}

Certainly one can use tikz but, for a change, I would not present one. But if you are interested, that is a different case ;)
In phasors, the electrical quantities are represented by a magnitude and an angle. The symbol for the angle is not the same as the inline traditional division symbol, but \angle is used in math mode for this.
For example for an R-L circuit with V and I can be expressed as follows:
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
\begin{equation}
\begin{aligned}
V_{sm} &= V_m \angle \phi,\quad \textup{and}\\
I_m &= I_m \angle \theta
\end{aligned}
\end{equation}
\end{document}
For more complex formulae one should go with the Steinmetz package as pointed out in the comment of egreg. Here is an example:
\documentclass{article}
\usepackage{steinmetz}
\begin{document}
\begin{itemize}
\item Inductor, $L$: $\mathbf{Z}=j\omega L=\omega L\phase{90^{\circ}}$,
\item Capacitor, $C$: $\displaystyle\mathbf{Z}=\frac{1}{j\omega C}=-j\frac{1}{\omega C}=\frac{1}{\omega C}\phase{-90^{\circ}}$.
\item $\mathbf{Z}= \phase{\alpha+\beta}$
\end{itemize}
\end{document}
The output is:
