Skip to main content

Section B.1 Jupyter

The first thing you need to know about doing linear algebra in Python is how to access a Python environment. Fortunately, you do not need to install any software for this. The University of Lethbridge has access to the Syzygy Jupyter Hub service, provided by PIMS (the Pacific Institute for Mathematical Sciences), Cybera, and Compute Canada. To access Syzygy, go to uleth.syzygy.ca and log in with your ULeth credentials. Below is a video explaining some of the features of our Jupyter hub.
Note: if you click the login button and nothing happens, click the back button and try again. Sometimes there’s a problem with our single sign-on service.
The primary type of document you’ll encounter on Syzygy is the Jupyter notebook. Content in a Juypter notebook is organized into cells. Some cells contain text, which can be in either HTML or Markdown. Markdown is a simple markup language. It’s not as versatile as HTML, but it’s easier to use. On Jupyter, markdown supports the LaTeX language for mathematical expressions. Use single dollar signs for inline math: $\frac{d}{dx}\sin(x)=\cos(x)$ produces \(\frac{d}{dx}\sin(x)=\cos(x)\text{,}\) for example.
If you want “display math”, use double dollar signs. Unfortunately, entering matrices is a bit tedious. For example, $$A = \begin{bmatrix}1 & 2 & 3\\4 & 5 & 6 &\end{bmatrix}$$ produces
\begin{equation*} A = \begin{bmatrix}1\amp 2\amp 3\\4\amp 5\amp 6\end{bmatrix}\text{.} \end{equation*}
Later we’ll see how to enter things like matrices in Python.
It’s also possible to use markdown to add emphasis, images, URLs, etc.. For details, see the following Markdown cheatsheet 1 , or this quick reference 2  from callysto.ca.
What’s cool about a Jupyter notebook is that in addition to markdown cells, which can present content and provide explanation, we can also include code cells. Jupyter supports many different programming languages, but we will stick mainly to Python.
You have attempted of activities on this page.