in the preamble, as described in the LyX Math Manual. This works fine in "normal" LaTeX, but in LyX I get an 'undefined control sequence' message when I try to convert to DVI or PDF.
Thanks, frabjous, a \usepackage{amsmath} in the preamble helped! Alternatively, I've just seen, in LyX one can also tick "Use AMS Math Package" in Document-->Settings-->Math Options.