8
$\begingroup$

I am wondering about advantages of using Python for teaching introductory linear algebra. I have been using Matlab and I became interested in Python mainly because of several resources, e.g., text 1 and video course 1 that use it, as well as the popularity of Sage. However, I have not used Python myself. If you have used Python for teaching linear algebra and especially if you have also used Matlab, how would you compare them.

I am aware that Scilab is free and similar to Matlab. So price consideration is not the main issue here.

Related:

  1. NumPy vs Matlab A comparison of language features.

  2. A Review from StackOverFlow, but not specific to teaching linear algebra.

  3. A review from a research point of view.

  4. A text on scientific computing with Python.

  5. A course and its Lab Manual on linear algebra.

$\endgroup$

3 Answers 3

10
$\begingroup$

If you are going to teach your students linear algebra, then you should limit yourself to teaching linear algebra.

If you absolutely have to use computers (which is itself an unnecessary and harmful distraction in the process of teaching mathematics), I believe that you should use software that is easy to use and allows your students to concentrate on learning mathematics.

If you will decide to use some fancy programming language, then you should keep in mind that your students will be struggling with both learning linear algebra, and learning new programming environment.

So imho:

1)Best solution: do not use computers!!! People will really learn something only when they will do all calculations by hand. This is the only way to understand all basic concepts of linear algebra. There is no king's road to mathematics.

2)Poor solution: use some user-friendly and easy-to-learn CAS (or numeric program), like Matlab or Mathematica or Octave. At least people will learn something about linear algebra.

3)Educational disaster: use some fancy programming language, like Python. People will learn almost nothing about linear algebra and almost nothing about programming. Moreover: they will associate linear algebra with programming, mixing concepts from both fields.

$\endgroup$
1
  • $\begingroup$ well said. I don't see why programming should be a significant part of linear algebra class at any level. This should be covered in a numerical analysis class. $\endgroup$
    – AnandJ
    Commented Jul 10, 2016 at 22:10
5
$\begingroup$

I would choose MATLAB over Python for the following reason: MATLAB is explicitly designed around matrix computations and can be used out of the box without any difficulty. Python has great libraries, but one must still understand Python syntax and language structure. There is an unnecessary, but small, learning curve when using Python.

MATLAB is also used far more frequently in industry for doing these such computations. While Python finds frequent use in the academic and research world, your students are by and large not going to be academics or researchers. They might, however, find utility in being able to claim "MATLAB experience" on a resume.

I've used both environments extensively; my first research publication involved doing FEM computations with Python. However, I find MATLAB to be far more "to the point."

If I want to solve $Ax = b$ in MATLAB, I simply type A\b and get the result immediately, no need to output to the console, import packages, or anything else.

$\endgroup$
7
  • 2
    $\begingroup$ "your students are by and large not going to be academics or researchers" --> How is this an argument in favor of a specialized software like MATLAB, as opposed to a general programming language like Python, that allows a student to fairly quickly learn other similar languages (since Python is not that much different from them)? $\endgroup$ Commented Jul 21, 2013 at 23:20
  • $\begingroup$ Python is also becoming one of the most popular languages in both education and industry. I don't speak it myself, but learning it would not be a waste of time. That said, I generally agree with Godot that calculators of any kind don't usually belong in math classes. $\endgroup$
    – dfeuer
    Commented Jul 22, 2013 at 0:58
  • $\begingroup$ @VedranŠego Because MATLAB has an extensive industry-based user community. $\endgroup$
    – Emily
    Commented Jul 22, 2013 at 1:23
  • $\begingroup$ I am aware of that, but that seems to be besides the point, for at least two reasons. First, Python, PHP, C/C++/C#, *.net, PERL,... they all have extended user communities. Second, a general purpose programming language gives a much wider choice of non-academic jobs. Mind you, I'm not arguing with your pro-MATLAB stance (I am here because I want to read others' opinions on the subject), but merely with the point of the argument I quoted in my first comment. $\endgroup$ Commented Jul 22, 2013 at 2:15
  • $\begingroup$ @VedranŠego But the purpose of the question is "how should I teach linear algebra with software," not "how should I choose the best programming language." There's nothing wrong with learning Python. I'm a big supporter of the language. But the purpose here isn't to teach a General Purpose language, and in any event, the limited scope of application indicated by the OP shows that even if a GP language was chosen, it wouldn't be taught generally anyways! Only the features/packages/routines used to do LinAlg would be taught. At that point, you're basically teaching a specialized package anyhow. $\endgroup$
    – Emily
    Commented Jul 22, 2013 at 12:45
0
$\begingroup$

I agree on the importance of teaching without computers. But you need to keep in mind that students will not be practicing math by hand through their professional career.

I would suggest a 2 step approach: 1) Grill through the math without computers to teach them concpets 2) Introducing simpler interface languages like MATLAB towards the end of the course. Expose them to a more realistic scenario: they will know the concepts to start with, and be excited to accelerate their work work through a professional software.

At the end of the day your students will have the insight and speed to work in this competitive world.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .