'\usepackage fails in VsCode Jupyter Notebook: Katex parse error undefined control sequence

I want to usepackage{amsmath} so I can get access to various features in my markdown. When I put $$\usepackage{amsmath}$$ in a markdown cell and try to display it, it says:

ParseError: KaTeX parse error: Undefined control sequence: \usepackage at position 1

How can I get this and other packages? I'm using VSCode to edit, and publishing on Google Colab.

I suspect that I'm misunderstanding how packages are supposed to be installed for Jupyter Notebook markdown.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source