Skip to main content

Chapter 1 Basics, Modules, and Graphing

In this chapter we will introduce just enough about Python to get started before introducing a Python package NumPy and a library MatPlotLib needed for mathematics and graphing. Note that Python is much more useful than you will see here and we will skip over a lot of information you would learn in a typical Computer Science Introduction to Python class. Our purpose is to merely get you familiar with the kinds of commands available in Python to compute matrix algebra.
To start, a traditional first program displays the text “Hello world.” or some variation. Python uses the function print() to display output, making the program simple.
Click the “Evaluate (Python)” button below to run the embedded Python code.
Note that snippets of Python code embedded in the textbook will always have a similar formatting, with the option to “evaluate”, that is, run or excecute the code at the end.