"<p>Programmers work with numbers all the time. Guess what, the same goes for mathematicians. Coincidence? I think not.</p> <p>We are not going to debate whether math is important for you to be an excellent programmer, because it is. Instead, I present you with 3 solid reasons that support this claim.</p> <p>Nevertheless, before I start, I'd like to clarify something: There is a huge difference between <strong>Importance</strong> and <strong>Necessity</strong>!</p> <p>Working out is important, but it isn't necessary. Drinking water on the other hand is an absolute necessity.</p> <p>The very same goes for mathematics.</p> <h1>Is Math Necessary for Programming?</h1> <div style="background:#eeeeee; border:1px solid #cccccc; padding:5px 10px">No, it's not!</div> <p>As simple as that. In your career as a programmer, the last thing you're going to NEED is math, unless you're creating a new coding language of course. Even when designing softwares for mathematicians, all the formulas would be already prepared for you, and all you have to do is, well, implement them.</p> <p>You can have a look at this <a href="https://www.youtube.com/watch?v=WzdiY61Bv_Q&t=78s">video </a>by <a href="https://www.youtube.com/channel/UCyUBW72KU30dfAYWLVNZO8Q">Stefan Mischook</a>,where he explains why math is no <strong>necessity </strong>for any programmer.</p> <p>Then why and how would it be <strong>important</strong> for you?</p> <h1>3 Reasons Why Math Is Important for Programmers</h1> <p>As I clearly stated above, math is no necessity for you to be a programmer. As a matter of fact, there are plenty of developers out there with little to minimum knowledge of math and its concepts. And even though most of the time, you will not be "needing" math, sometimes you will. And that's where a line is drawn, between an average and a good programmer!</p> <p>Here's how math will help you become an excellent master of coding:</p> <h2>1- Thinking Algorithmecally </h2> <p><em>"First solve the problem. Then, write the code"</em></p> <p><a href="https://www.defprogramming.com/quotes-by/john-johnson/">John Johnson</a></p> <p>We all know how significant problem-solving is for a programmer. One major benefit that anyone would think of when speaking about math, is logical thinking. Why is that?</p> <ul> <li> <p>Mathematics requires a particular way of thinking, that is very similar to the one coding demands.</p> </li> <li> <p>Reasoning is a big pillar of mathematics, and it involves mapping logical conclusions based on evidence.</p> </li> <li> <p>Mathematics will teach you how to spot connections between concepts.</p> </li> <li> <p>Math is important in learning the fundamentals that go into things such as schedulers, optimizations, sorting, protocol management and several other features of processors.</p> </li> </ul> <p> </p> <p>Andrew Wiles, an English mathematician, once said:</p> <p>"Pure mathematicians just love to try unsolved problems - they love a challenge."</p> <p>At DevBrains we believe that <span class="marker">"Pure Programmers just love to try unsolved problems - they love a challenge!"</span></p> <p>This thought process, which is almost the same used in programming, can give you a  push in tackling large programming projects, figuring out solutions faster...</p> <h2>2- Specialization</h2> <p>Some areas of programming are indeed math-free; however, others do require quite an understanding of mathematics. Maybe not an advanced one, but a minimum knowledge is expected from you.</p> <p>Let's take <strong>3D programming</strong> for example.</p> <h3><strong>3D programming</strong></h3> <p>No sane person would even suggest that 3D geometry is not a must-know in this field. Needless to mention the huge amount of <a href="https://stackoverflow.com/a/2122942">linear algebra</a> you'll need: a decent knowledge of these concepts is expected:</p> <p>"</p> <ul> <li><strong>Vector:</strong> position, velocity, normals</li> <li><strong>Matrix:</strong> transformations</li> <li><strong>Quaternion:</strong> rotations (great for bone animations)</li> <li><strong>Ray:</strong> projectile collision detection</li> <li><strong>Plane:</strong> projectile collision detection</li> <li><strong>Frustum:</strong> render culling</li> <li><strong>Sphere: </strong>render culling, fast collision test</li> <li><strong>Axis-Align Bounding Box: </strong>culling, collision tests, spacial partitioning</li> <li><strong>Oriented Bounding Box:</strong> collision tests</li> <li><strong>Convex Hull</strong> :collision, spacial partitioning</li> <li>etc.</li> </ul> <p>"_ <a href="https://stackoverflow.com/users/257311/aleks">Aleks</a></p> <h3><strong>Game development:</strong></h3> <p>According to <a href="http://gamedesigning.org/">Gamedesigning.org</a>, mathematics is the foundation of every video game.</p> <p>General sections of math used in game design and development involve Trigonometry, Calculus, Linear Algebra, Discrete Mathematics, Applied Mathematics, etc.</p> <h2>3- It Makes Life Easier</h2> <p>I love rice!</p> <p>I used to cook rice using a normal, simple pot. It would come out great, but the cooking process used to be quite exhausting (I surely mean longer). After I started using a rice cooker, it made my life easier!</p> <p>See what I'm aiming at?</p> <p>Yes, even though both programmers, who use math and who don't, will solve a problem. However, a programmer with a mathematical approach will solve it faster, more efficiently, and will be having more time to think about ways to improve the code.</p> <h1>Linear Algebra and Math for Coding</h1> <p>If you're convinced, even a little bit, of the big role math will play in your career, I'd suggest you start learning!</p> <p>If we're speaking about programming and math, the first domain of mathematics that will be popping out is Linear Algebra.</p> <p>In Machine learning, matrices are a Data Scientist's fuel, they're extensively used to express data and represent any machine learning problem.</p> <p>This is why it is key for programmers to be well aware of terms like:</p> <ul> <li>Matrices</li> <li>Vectors</li> <li>Linear equations</li> <li>Linear transformation</li> </ul> <p>I would also recommend Cormen's Introduction to Algorithms in your learning journey, as it covers:</p> <ul> <li>Random variables</li> <li>Topological sort</li> <li>Matrix operations</li> <li>Number theory</li> <li>etc</li> </ul> <h1>Conclusion</h1> <p>From thinking logically, to excelling at game development, math shall be your go-to if you want to be a better programmer.</p> <p>This blog is far away from our previous one where we discussed whether <a href="https://devbrains.tn/blog/how-important-is-english-for-programmers">English is necessary for programmers</a>.</p> <p>The fact that math is important to any programmer is already a fact, and we're not here to debate that.</p> <p>At DevBrains, we love to hear what future master coders think of our blogs, that's why we look forward to hearing what you think in the comment section below.</p> <p>Hey, if you still have some free time, I suggest you have a quick look at this 05:00 min YouTube video by <a href="https://www.youtube.com/channel/UCV0qA-eDDICsRR9rPcnG7tw">Joma Tech</a>: <a href="https://youtu.be/sW9npZVpiMI" target="_blank">Why you NEED math for programming</a>.</p>"