Learning math through programming?

In summary, I'm looking to switch careers but I need to learn math from the ground up. I like the idea of physics or engineering (Specifically something related to product design). Problem is, I have a really crappy math background and need to fill in that gap in knowledge, among other things, before going back to school. I dropped out of high school in the 10th grade so I don't really know much beyond basic algebra. However I do really enjoy programming and I know java, c++, python and some web scripting languages. Since I really enjoy programming I'm wondering if it's possible to learn math through programming? Don't get me wrong, I know I'll still have to go through math textbooks and
  • #1
sushifiend
5
4
In short, I'm looking to switch careers but I need to learn math from the ground up. I like the idea of physics or engineering (Specifically something related to product design). Problem is, I have a really crappy math background and need to fill in that gap in knowledge, among other things, before going back to school. I dropped out of high school in the 10th grade so I don't really know much beyond basic algebra. However I do really enjoy programming and I know java, c++, python and some web scripting languages.

Since I really enjoy programming I'm wondering if it's possible to learn math through programming? Don't get me wrong, I know I'll still have to go through math textbooks and solve each and every problem in them but I'm just curious if you can build some foundational knowledge through programming. http://projecteuler.net/ comes to mind but it doesn't provide a solid or systematic framework for learning math nor is its goal to. "The Haskel road to Logic, Maths and Programming" looks like an intriguing textbook skirting the idea of where I'm getting at.

I'm also curious if the problem solving skills you learn through programming/CS transfer over to math? I've read of a couple of cases where people who'd learned LISP breezed through previously difficult calculus courses.

ETA: Let me reformulate my question. HOW can I learn math through programming? What environments, IDEs, languages can I use so as to make my ride through math as enjoyable and engaging as possible? I plan on going through algebra I&II books, basic geometry (Harlod Jacobes, Geometry Revisited), and then onto a precalculus book (Like Serge Lang's Basic Mathematics, or the Principles of Mathematics by Oakley). But maybe it would be more fun to review certain things I learned by creating their own functions, or simulating certain physics in a program.
 
Last edited:
Physics news on Phys.org
  • #2
Yes, I certainly think this is a good idea. I'm absolutely convinced that you can learn a lot of math through programming. And I'm sure knowing programming is very beneficial to learning mathematics.

However, I don't know any books specifically made for people in your situation. Perhaps a good idea is to take books like basic mathematics of Lang and invent your own programs. For example, one of the first exercises in the book is to prove that

[tex](a+b) + (c+d) = a+ (b+(c+d))[/tex]

using only the associative law. It shouldn't be too difficult to generalize this and write a program that solves the general problem. Likewise, you could build programs to solve polynomial equations and so on.

It is well-known that you can build up a lot of math using only sets. So a thing I did once is to build a lot of mathematics using only the concept of set and some related operations. In the end, I could handle rational numbers fine, but the program was extremely slow so I never continued it. However, projects like these are very interesting to do when learning mathematics.

A book that has very good and mathematical exercises is the following: http://en.wikipedia.org/wiki/Structure_and_Interpretation_of_Computer_Programs
 
  • #3
I disagree. I don't think this is really any more practical than learning European History through programming. I think this will leave you with huge gaps in your knowledge.
 
  • #4
Incredibly bad idea. At least with the traditional approach to learning, you get exposed to concepts and ideas in a somewhat ordered manner, building on your previous knowledge and experience. Who knows how long it would take you to become bored with programming and drop that for some other activity?
 
  • #5
sushifiend said:
I've read of a couple of cases where people who'd learned LISP breezed through previously difficult calculus courses.

That's a bit like saying that there are cases where people who'd studied Latin and Classical Greek breezed through a course in conversational Spanish.

THe sort of math that R130a1 is talking about has negligible practical use for engineering or physics.

IMO what will get from "learning math through programming" are some "pop-sci" ideas about a few areas of math like number theory, dynamical systems (e.g. chaos and fractals), graph theory, etc. Interesting though that might be, it's not the math you need for physics or engineering - at least, not until you get to grad school level physics.

My advice: get some good high-school-level textbooks, and do the hard yards working through them. When you want to take a break from that, by all means do some computing if that floats your boat.

As for the MIT book, draw your own conclusions from the fact that they stopped using it as a text for their course, nearly 10 years ago. In any case, the course was intended to teach the basics of computer science, not the basics of engineering math. That's not to say it's a bad book - just an irrelevant one IMO.
 
  • #6
Vanadium 50 said:
I disagree. I don't think this is really any more practical than learning European History through programming. I think this will leave you with huge gaps in your knowledge.

+1 on that
 
  • #7
I guess the consensus is in and it ain't good. I'm still hoping though that there is an engaging way to use Matlab, or programming to at least reinforce what I've learned through textbooks. Anyways, back to my goal. I'd like to first be able to tackle a rigorous Calculus book like Courant's and then eventually a calculus based physics book like Alonso and Finn's. My academic end goal is to do some sort of mechanical engineering grad program which involves design but I'd like to see where my interest in physics takes me first (I know, I know, engineering and physics involve different skillsets).

I'm willing to linger in precalculus stuff for a while in order to truly get a good grasp of the fundamentals. Here are the books I'll be using:

Algebra I
Elementary Algebra, Jacobs
Algebra, Gelfand
Elements of Algebra, Euler

Geometry
Geometry 2nd Ed, Jacobs
Euclid's Works
Geometry Revisted

Trigonometry
Trigonoemtry, Gelfand

Algebra II, Geomery II & Other Precalculus Stuff
Principles of Mathematics by Oakley (This seems like the most rigorous precalc book out there, goes over basic deductive logic and proof techniques and has a ton of exercises)
Precalculus, Cynthia Young
Precalculus, Sullivan

Problem Solving
How to Solve it, Polya
How to Prove it, Vellman
USSR Math Olympiads

I'll also probably read a whole bunch of non-math or algebra/trig dependent physics intro books like "Thinking Physics" or "Basic Physics: A Self-Teaching Guide", some project based books and a whole batch of books dealing with electronics and circuits.
 
  • #8
https://www.youtube.com/watch?v=xYONRn3EbYY
 
  • #9
R136a1 said:
https://www.youtube.com/watch?v=xYONRn3EbYY
After a few minutes I was thinking to myself... if he says maths one more time I was going to throw the computer. Spice it up a little bit, throw in “mathematics" a couple more times.

I also disagree personally with a lot of his ideas. He sounds like he's advocating using math without properly understanding even the small bits that are required to be understood now.
 
  • #10
Student100 said:
After a few minutes I was thinking to myself... if he says maths one more time I was going to throw the computer. Spice it up a little bit, throw in “mathematics" a couple more times.

I also disagree personally with a lot of his ideas. He sounds like he's advocating using math without properly understanding even the small bits that are required to be understood now.

He's advocating the opposite of this. He wants a more conceptual understanding, by delegating most menial tasks to the computer. The point is that instead of doing mindless computations for hours, you can just make a program to do those things for you. I don't believe that people who succesfully program a computer to solve problems are worse off than people who solve it by hand.

I'm certainly not against drill exercises, because they teach valuable things like pattern recognition. So they should certainly still be done. But the total lack of computers and programming in education right now (at least for me) is also not good. We need a careful balance between the two. And I do certainly think that programming can be extremely beneficial to a mathematics education.
 
  • #11
How do you make a program to do it for you without having a good understanding of the mechanics? You cant.

Sure, CS can be really useful to a math or physics major. I’ve gone through some programming courses and it seems useful to me. He is advocating shifting mathematical pedagogy to being able to set up math problems for a computer to solve, and looking at the consequences. That isn't math, it's modeling without any understanding of how the model works.
 
  • #12
Student100 said:
How do you make a program to do it for you without having a good understanding of the mechanics? You cant.

Exactly. So you'll need to learn the mechanics in order to solve the programming question. It seems to me that programming is way better to learn the mechanics than just following the same outline over and over again. Cause face it, most students today just memorize the steps and don't understand anything.

Sure, CS can be really useful to a math or physics major. I’ve gone through some programming courses and it seems useful to me. He is advocating shifting mathematical pedagogy to being able to set up math problems for a computer to solve, and looking at the consequences. That isn't math, it's modeling without any understanding of how the model works.

Modeling and problem solving are a huge part of math. That's what programming teaches. Being able to compute tedious integrals is also part of math, but it's sad that most of the focus nowadays is on that part of mathematics. Face it, if you ever get a difficult integral (after passing calculus courses), most of us will just go to wolfram alpha and let them solve it for you. But in a calculus course, how many times do you get to use a computer? Almost never (at least with me). I notice a discrepancy there.
 
  • #13
Student100 said:
How do you make a program to do it for you without having a good understanding of the mechanics? You cant.

"We don't want students to be third-rate computers, we want them to be first-rate problem solvers." That's the essence of Conrad Wolfram's talk. You can argue all you want about how to do that, but it's incontrovertible that the way we're currently teaching K-12 isn't working at all for the large majority of students.

His assertion that 80% of students' time is spent learning to or practicing calculating is about right. I'd argue for about 10-20%, and most of that spent doing estimation.

But I doubt that any of this really helps the OP. On that note I have to agree with most here that using programming to learn math doesn't work very well. Where it's useful is in learning mathematical thinking: setting up a mathematical model of what you want to understand and then coding it to yield visible results is good training for doing math.
 
  • #14
R136a1 said:
Exactly. So you'll need to learn the mechanics in order to solve the programming question. It seems to me that programming is way better to learn the mechanics than just following the same outline over and over again. Cause face it, most students today just memorize the steps and don't understand anything.
Modeling and problem solving are a huge part of math. That's what programming teaches. Being able to compute tedious integrals is also part of math, but it's sad that most of the focus nowadays is on that part of mathematics. Face it, if you ever get a difficult integral (after passing calculus courses), most of us will just go to wolfram alpha and let them solve it for you. But in a calculus course, how many times do you get to use a computer? Almost never (at least with me). I notice a discrepancy there.

Why complicate the process with also learning computer programming simultaneously, do students really need to learn about how cast objects using <complex> for complex quadratic solutions, or how to set up do loops or input validation to do such things?

I would argue that computer programming teaches you how to program with a certain style and concepts like virtual functions, file I/O, classes, structures, pointers... Not problem solving. Computer science classes come closer, but they're still no substitute. Wolfram alpha is just a tool, you don't learn the concepts of either programming or math using it. If you already understand the math mechanics behind what you're doing, then that's fine. How would you argue learning math by punching problems into wolfram though? Who validates its logic, or who writes the next generation of wolfram code that way?

I agree with the rebuttals at the end of the video more so.
 
Last edited:
  • #15
Student100 said:
Why complicate the process with also learning computer programming simultaneously, do students really need to learn about how cast objects using <complex> for complex quadratic solutions, or how to set up do loops or input validation to do such things?

I would argue that computer programming teaches you how to program with a certain style and concepts like virtual functions, file I/O, classes, structures, pointers... Not problem solving. Computer science classes come closer, but they're still no substitute. Wolfram alpha is just a tool, you don't learn the concepts of either programming or math using it. If you already understand the math mechanics behind what you're doing, then that's fine.How would argue learning math by punching problems into wolfram though? Who validates its logic, or who writes the next generation of wolfram code that way?

Sigh. As I expected, people start making a caricature of my position. I don't argue learning math by punching problems into wolfram. Computations by hand are still a very important thing and should still have an important place in education. All I'm saying is that programming is very beneficial to mathematics and should get way more attention than it gets now.

I also don't think you should necessarily learn C++ for this. A simple language like python should be good enough. The focus is on problem solving, not programming, so things like pointers wouldn't even be talked about.

Input validation is still important in mathematics. So many times during tutoring I noticed that people just memorized the steps, and when I ask something conceptual like "what kind of object is ##x##", they just couldn't answer. It is my (naive) hope that this would change by learning them how to solve problems and not just how to follow simple steps.

Structures and object-oriented programming can be very helpful to teach abstraction in a concrete way.

So please, try to understand my position first before attacking it by making it into a caricature. Thank you.

Also, very nice reading is this: http://mysite.science.uottawa.ca/mnewman/LockhartsLament.pdf It doesn't touch on programming but it touches on a lot of things wrong with modern math education.
 
  • #16
R136a1 said:
Sigh. As I expected, people start making a caricature of my position. I don't argue learning math by punching problems into wolfram. Computations by hand are still a very important thing and should still have an important place in education. All I'm saying is that programming is very beneficial to mathematics and should get way more attention than it gets now.

I also don't think you should necessarily learn C++ for this. A simple language like python should be good enough. The focus is on problem solving, not programming, so things like pointers wouldn't even be talked about.

Input validation is still important in mathematics. So many times during tutoring I noticed that people just memorized the steps, and when I ask something conceptual like "what kind of object is ##x##", they just couldn't answer. It is my (naive) hope that this would change by learning them how to solve problems and not just how to follow simple steps.

Structures and object-oriented programming can be very helpful to teach abstraction in a concrete way.

So please, try to understand my position first before attacking it by making it into a caricature. Thank you.

Input validation for programming goes far beyond your example, you also need to check if a user enters a character were there should have been number and latches your program into faulted state. Or the buffer stream contains garbage, and ect.

Im not making a caricature out of your argument, I’m basing your argument in the context of the video and what it's selling. If you’re only suggesting that students should continue to learn math without computer aides or calculators and also learn programming and modeling in high school than I agree. However, it appears to me in the context that you're advocating Conrad's position of decreasing the ability of students to preform calculations since computers do it faster. I completely disagree.

There are some algorithms and mathematical problem solving techniques you can't do without the use of pointers/dynamic arrays/ect. The scope of what you limit yourself to by using simple python techniques is exceptionally shallow.

So again if you're advocating learning programming and modeling in conjunction with calculations by hand in a proper math class, I agree.
 
  • #17
I have to admit that at one point in time in my school I did consider this idea, learning math through programming. But then I realized I need to learn whole new programming concepts together, including syntax, good practices, etc and it's just not too practical for students like me who have to face with tests and assignments every week.

I don't know if being experienced in programmer would help, but for me, learning mathematics using pencil/pen and scratch paper is what works best and I would suggest the OP to do the same, especially on learning the basics.
 
  • #18
Student100 said:
After a few minutes I was thinking to myself... if he says maths one more time I was going to throw the computer.

You know that's how the English say it, right?
 
  • #19
I'm in two minds about the general Wolfram issue. Maybe it is not that much an improvement if uninspired uninsightful traditional teaching by teachers with a weak grasp of trad math is replaced by uninspired uninsightful newfangled teaching by teachers with a weak grasp of computer-using problem-solving?

With decent school teachers was trad so bad? Mine could have been better, or so I thought fresh out of Uni; looking back from a much greater distance now I tend to think they were not at all that bad either; their lessons I am often conscious of when I do a help job here.

But for the OP there is surely room for one individual to take (or risk) an innovative path?
 
Last edited:

Related to Learning math through programming?

1. How can programming help with learning math?

Programming can help with learning math by providing a hands-on and visual approach to understanding mathematical concepts. By writing code to solve mathematical problems, students can gain a deeper understanding of the underlying principles and see how they can be applied in real-world scenarios.

2. What programming languages are best for learning math?

There are many programming languages that can be used for learning math, but some popular choices include Python, Java, and Scratch. These languages are beginner-friendly and have libraries that specifically focus on mathematical concepts.

3. How does learning math through programming differ from traditional math learning?

Learning math through programming differs from traditional math learning in that it combines computational thinking with mathematical thinking. It also allows for a more interactive and engaging learning experience, as students can experiment with different solutions and see immediate results.

4. What are some examples of math concepts that can be learned through programming?

Some examples of math concepts that can be learned through programming include algebraic equations, geometry, statistics, and data analysis. Programming can also be used to simulate and visualize mathematical concepts, such as fractals and complex numbers.

5. Can programming be used to make math more fun and engaging?

Yes, programming can be a fun and engaging way to learn math. By using code to solve puzzles, create games, or visualize mathematical concepts, students can approach math in a more creative and enjoyable way. Additionally, programming allows for a hands-on approach, which can help with retention and understanding of math concepts.

Similar threads

  • STEM Academic Advising
Replies
1
Views
931
  • STEM Academic Advising
Replies
16
Views
547
  • STEM Academic Advising
Replies
3
Views
970
Replies
2
Views
937
  • STEM Academic Advising
Replies
14
Views
1K
  • STEM Academic Advising
Replies
3
Views
1K
  • STEM Academic Advising
Replies
9
Views
1K
  • STEM Academic Advising
Replies
9
Views
2K
  • STEM Academic Advising
Replies
15
Views
1K
  • STEM Academic Advising
Replies
5
Views
952
Back
Top