I'm relatively new to LaTeX and I still don't really know how to use the \newcommand feature at all (new to stackexchange as well). I've been trying to find out how to print something like this

I've tried various ways and so far the code with the least number of errors is this:
\newcommand{\xmatrix}[6]{
\begin{vmatrix}
$i & j & k$\\
{u1} & {u2} & {u3}\\
{v1} & {v2} & {v3}
\end{vmatrix}}
I'm pretty sure I'm just using the \newcommand part wrong but I want to be able to print the unit vectors in bold in the first row and the next 6 numbers are input. Thank you for any advice!


\makeatletterand\makeatotherdo? and What is the use of percent signs (%) at the end of lines?. The%are not really necessary here (spaces are ignored in math mode) but they are an habit. – campa Sep 25 '20 at 12:09