<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Technological Singularity - Medium]]></title>
        <description><![CDATA[Toward the singularity and beyond: serving humanity, guided by humanity! - Medium]]></description>
        <link>https://medium.com/technological-singularity?source=rss----fac940e846d0---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Technological Singularity - Medium</title>
            <link>https://medium.com/technological-singularity?source=rss----fac940e846d0---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 20:07:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/technological-singularity" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Getting Started with LaTeX to Write a Maths Book]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/technological-singularity/getting-started-with-latex-to-write-a-maths-book-c259bfa528e5?source=rss----fac940e846d0---4"><img src="https://cdn-images-1.medium.com/max/1342/1*BjpV3UmHNiHt8qkKL6aMQw.png" width="1342"></a></p><p class="medium-feed-snippet">I recently decided to write a book, based in part on articles I have published here.</p><p class="medium-feed-link"><a href="https://medium.com/technological-singularity/getting-started-with-latex-to-write-a-maths-book-c259bfa528e5?source=rss----fac940e846d0---4">Continue reading on Technological Singularity »</a></p></div>]]></description>
            <link>https://medium.com/technological-singularity/getting-started-with-latex-to-write-a-maths-book-c259bfa528e5?source=rss----fac940e846d0---4</link>
            <guid isPermaLink="false">https://medium.com/p/c259bfa528e5</guid>
            <category><![CDATA[latex]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[publishing]]></category>
            <category><![CDATA[education]]></category>
            <dc:creator><![CDATA[Martin McBride]]></dc:creator>
            <pubDate>Fri, 31 May 2024 07:50:31 GMT</pubDate>
            <atom:updated>2024-11-13T16:52:32.846Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Feynman’s Path Integral Approach to Quantum Mechanics]]></title>
            <link>https://medium.com/technological-singularity/feynmans-path-integral-approach-to-quantum-mechanics-66371ee1c810?source=rss----fac940e846d0---4</link>
            <guid isPermaLink="false">https://medium.com/p/66371ee1c810</guid>
            <category><![CDATA[quantum-physics]]></category>
            <category><![CDATA[physics]]></category>
            <category><![CDATA[science]]></category>
            <category><![CDATA[mathematics]]></category>
            <dc:creator><![CDATA[Beyond the Horizon]]></dc:creator>
            <pubDate>Sat, 25 May 2024 18:27:15 GMT</pubDate>
            <atom:updated>2024-05-25T18:27:15.499Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*lbitxhU4gaW-Vone" /><figcaption><a href="https://en.wikipedia.org/wiki/Richard_Feynman">Richard Feynman</a></figcaption></figure><p>Quantum mechanics, a fundamental theory in physics, describes the behavior of particles at the smallest scales. While traditional formulations like the Schrödinger equation have offered deep insights, Richard Feynman introduced a different and highly influential method in the 1940s known as the path integral approach. This method has since reshaped our understanding of particle behavior, providing a new perspective that complements other quantum theories.</p><p>Feynman’s approach is fascinating because it proposes that particles don’t travel from one point to another along a single path; instead, they explore every possible path simultaneously. In classical mechanics, a particle has a definite path, determined by which path minimizes the action — a concept that measures the dynamics of the system. However, in the quantum world, things aren’t so straightforward. According to Feynman, every conceivable path contributes to the probability of where a particle will be found.</p><p>To calculate these probabilities, Feynman assigned a number, called a probability amplitude, to each path. This number isn’t just any ordinary number but involves complex numbers and exponentials. Specifically, the probability amplitude for each path is proportional to the exponential of the action of that path, multiplied by a complex phase. This might sound complicated, but the core idea is that the action of a path influences how much that path contributes to the final destination of the particle.</p><p>According to Feynman’s theory a photon doesn’t follow just one route. Instead, it takes every possible route simultaneously. Some paths are straight, and some are more indirect than others. The probability of finding the photon at a particular spot is determined by adding up the complex amplitudes of all these paths. Paths with similar actions will add constructively and increase the likelihood of the photon arriving along those paths, while others will cancel out due to differing phases, demonstrating quantum interference.</p><p>This sum over all possible histories is not a straightforward addition, as it involves integrating over an infinite number of possible paths, a process made manageable through advanced mathematical techniques. The path integral approach excels in systems where actions are dominated by quadratic terms, making it solvable and useful for exact solutions and approximations alike.</p><p>Let’s consider a practical example that illustrates Feynman’s path integral approach in a quantum mechanical context, using the analogy of light traveling from a distant star to Earth — a scenario that might seem straightforward at first but is intriguing when viewed through the lens of quantum mechanics.</p><h4>Light’s Journey from a Star to Earth</h4><p>Imagine light emitted from a star many light years away. In classical physics, we would predict that light travels in a straight line from the star to Earth, following the path of least action, a direct route that minimizes energy used over time. This is a simple and efficient path, much like choosing the shortest walking route in a city map.</p><p>However, according to Feynman’s path integral formulation, the photon emitted by the star does not take just one path. Instead, it takes every conceivable path to reach Earth. Some of these paths are direct, some zigzag wildly through space, and others may loop around other celestial bodies before heading toward Earth.</p><p>Each of these paths contributes to the overall probability amplitude of the photon’s arrival at a specific location on Earth. The paths closer to the classical straight line, being simpler and requiring less action (in terms of interactions and deviations), contribute more significantly to the probability amplitude. These are analogous to major roads on a map that are typically faster and more direct. Conversely, the more convoluted paths, which might involve bouncing off interstellar objects or taking long detours, contribute much less to the final probability amplitude, much like a convoluted detour on a city map that is less likely to be chosen for a quick commute.</p><p>To visualize these multiple paths, one could use <a href="https://en.wikipedia.org/wiki/Feynman_diagram">Feynman diagrams</a>, which would depict not only the direct interactions but also possible interactions with other particles along the way. These diagrams simplify the complex probabilities into manageable visualizations, where each vertex or interaction point on the diagram represents a potential change in the path or state of the photon.</p><p>Ultimately, the photon’s behavior is a superposition of all these paths, and the path that we observe (the photon arriving on Earth from the star) is only one of many possibilities, influenced by the sum of the amplitudes of all possible paths. This emphasizes the quantum nature of reality, where every possible history has its contribution, and our classical intuition about the simplest path is only part of a much richer, probabilistic picture.</p><p>This example encapsulates the essence of Feynman’s path integral approach and demonstrates its radical departure from classical mechanics, illustrating a universe that is fundamentally probabilistic rather than deterministic.</p><h4>The Double Slit Experiment</h4><p>The double slit experiment is a classic example of Feynman’s path integral formulation in action and beautifully demonstrates the core principles of quantum mechanics, particularly quantum superposition and interference.</p><p>In the double slit experiment, particles (such as electrons, photons, or even larger molecules) are fired towards a barrier that has two slits. After passing through the slits, the particles hit a detection screen behind the barrier. If particles behaved like classical particles, you would expect to see two distinct bands directly opposite the two slits on the detection screen, corresponding to the paths through each slit.</p><p>However, what is actually observed is a pattern of many bands or fringes of varying brightness. This pattern results from interference, indicative of the particles exhibiting wave-like properties. According to quantum mechanics, each particle passes through both slits simultaneously, not as a single localized entity but as a wave spreading out and passing through both slits.</p><p>Feynman’s path integral approach provides a profound explanation for this phenomenon. It suggests that each particle explores all possible paths from the source to the detection screen. The paths include going through the first slit, going through the second slit, possibly bouncing off the edges of the slits, and every other imaginable path. The interference pattern arises because the probability amplitudes associated with these paths combine.</p><p>Some paths will be in phase and constructively interfere (enhancing the probability of the particle arriving at specific points on the screen), while others will be out of phase and destructively interfere (reducing the probability of the particle arriving at other points). The bright fringes on the screen correspond to points of constructive interference (where paths add up in phase), and the dark areas correspond to destructive interference (where paths cancel out).</p><p>This experiment highlights the radical departure from classical intuition: particles in quantum mechanics do not have well-defined positions or paths before measurement. Instead, their behavior is better described by a sum over all possible paths, with the final observed outcome being a result of the interference of all these paths’ probability amplitudes. This experiment directly supports the idea that quantum entities like photons and electrons behave as both particles and waves, depending on how they are observed, a central concept in quantum mechanics and particularly illustrative of Feynman’s contributions.</p><p>Beyond providing a new way to calculate quantum phenomena, the path integral formulation has found essential applications in various physics fields. In quantum field theory, it helps calculate how particles scatter and interact. In statistical mechanics, it offers methods to analyze systems at thermal equilibrium. Moreover, the approach has potential implications for quantum gravity, where non-perturbative methods are necessary.</p><p>Feynman’s path integral approach has dramatically expanded our toolkit for understanding and calculating quantum effects. By conceptualizing particle motion as a sum over all conceivable paths, Feynman not only offered a new perspective on quantum mechanics but also paved the way for advancements in several branches of theoretical physics. His ideas continue to influence how we understand the fundamental nature of the universe, demonstrating the power of looking at old problems through new lenses.</p><h4>Fundamental Example</h4><p>A problem that demonstrates the principles of Feynman’s path integral formulation in a basic setting is the calculation of the probability amplitude for a particle to move from one point to another in a given time. Let’s consider a simple scenario: a free particle moving from point A to point B without any potential field or interactions.</p><p><strong>Problem Setup:</strong></p><ul><li><strong>Initial Condition</strong>: A particle starts at</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/0*DpQZFuvLIzTJAM1A" /></figure><ul><li><strong>Final Condition</strong>: The particle ends at</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/0*TsLEecYfHz2-8cJn" /></figure><p><strong>Objective</strong>: Calculate the probability amplitude for the particle to move from A​ to B under the path integral formulation.</p><p><strong>Define the Action</strong>: The action S for a free particle (no potential energy) is given by:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/219/0*9UwJ_q7yFxgDV2VT" /></figure><p>where x dot is the velocity of the particle, and <em>m</em> is its mass.</p><p><strong>Path Integral</strong>: The probability amplitude <em>K</em> for the particle to transition from A to B​ is given by the path integral</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/0*bc8Hwc4SaANCssbV" /></figure><p>where <em>Dₓ</em> indicates integration over all possible paths <em>x(t)</em> that start at A​ and ends at B​, and ℏ is the reduced Planck constant.</p><p><strong>Evaluating the Path Integral</strong>: For a free particle, the path integral can be solved exactly. The paths that contribute significantly are those close to the classical path that minimizes the action <em>S</em>. In this simple case, the classical path is a straight line motion from A to B​ with constant velocity</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/141/0*edwZv-oDOZbUemYD" /></figure><p>The action along this path is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/0*jpuYUoplO0lkGN9_" /></figure><p><strong>Solution</strong>: The exact solution for the probability amplitude in this case is given by</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/0*m1Ov6ysfXcUnrbBV" /></figure><p>The probability amplitude <em>K</em> represents the quantum mechanical amplitude for the particle to travel from A​ to B​ in the time interval​, considering all possible paths but with dominant contributions from the classical path. This example showcases the basic application of Feynman’s path integral in calculating quantum amplitudes for simple quantum systems.</p><p>In the path integral formulation of quantum mechanics, particularly for simple systems like a free particle (where there are no forces acting on the particle), the most likely path — the path that contributes most significantly to the path integral — is a straight line path. This path corresponds to the classical path that the particle would follow according to classical mechanics.</p><p>In classical mechanics, the path that a system takes between two points is the one that minimizes the action (Principle of Least Action), a quantity which is defined as the integral over time of the Lagrangian of the system. The Lagrangian for a free particle is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/133/0*c600Bi5f5NUFSOxn" /></figure><p>The action for any path from point A to point B over a time t is given by:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/191/0*0L5AlGyYW6K5xbB9" /></figure><p>The path that minimizes this action under the condition of fixed endpoints is a straight line with constant velocity.</p><p>In the quantum realm, even though all paths are considered, the path integral formulation suggests that the sum over all possible paths between two points is dominated by those paths near the one that minimizes the action — the classical path. This is because contributions from paths far from the classical path tend to interfere destructively and cancel out, reducing their impact on the overall probability amplitude.</p><p>The probability amplitude for a path is weighted by the exponential of the action (multiplied by i/ℏ),</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*_Bq-3xy2nF6t4I58" /></figure><p>Near the classical path, where the action is minimal, these contributions add constructively.</p><p>Although quantum mechanics allows for the possibility of a particle taking bizarre and non-intuitive paths (like looping or detouring significantly from the direct route), the overwhelming contributions come from paths that are close to what we expect in classical mechanics when no forces are present.</p><p>The straight-line path not only makes physical sense (being the shortest and requiring the least change in kinetic energy) but also aligns with the predictions of classical physics in the limit of large quantum numbers or large masses (correspondence principle).</p><p>This agreement between the classical path and the dominant contribution in the path integral is a beautiful aspect of quantum mechanics that shows how classical mechanics emerges from quantum principles under appropriate conditions. It illustrates how Feynman’s path integral approach bridges the gap between quantum behavior and classical laws.</p><h4>General Relativity and Quantum Gravity</h4><p>In the context of quantum gravity, the focus shifts from traditional forces to the dynamics and curvature of spacetime itself, which is a significant departure from how other forces (like electromagnetism, weak, and strong nuclear forces) are described in quantum field theory.</p><p>In Einstein’s theory of general relativity, gravity is not treated as a force between masses, as it was in Newtonian physics. Instead, it is described as the effect of the curvature of spacetime caused by mass and energy. Objects move along paths called geodesics, which are essentially the &quot;straightest&quot; possible paths in this curved spacetime. The presence of mass or energy bends spacetime, and this curvature dictates how objects move.</p><p>Quantum gravity seeks to extend this concept into the quantum realm, where quantum effects become significant, such as at extremely small scales close to the <a href="https://medium.com/@prmj2187/plank-units-0cca79974424">Planck</a> length (10^-35 meters) or in conditions of immense gravitational fields like those near black holes or during the early moments of the Big Bang.</p><p>The extension of path integrals to quantum gravity represents one of the more ambitious and complex areas in theoretical physics. Path integrals, which were initially developed for quantum mechanics and quantum field theory, offer a way to calculate the probability amplitudes by summing over all possible histories of a system. When applied to gravity, this approach attempts to integrate over all possible geometries of spacetime itself, a concept that fundamentally challenges and extends our understanding of both quantum mechanics and general relativity.</p><h4>Reference</h4><p>“The Quantum Entanglement. (2020, April). Feynman’s Path Integral Formulation and Its Implications. Retrieved from <a href="https://thequantumentanglement.blogspot.com/2020/04/feynmans-path-integral-formulation-and.html">https://thequantumentanglement.blogspot.com/2020/04/feynmans-path-integral-formulation-and.html</a>&quot;</p><p>“Feynman’s Path Integral Explained with Basic Calculus” by Swapnonil Banerjee, Ph.D.: Banerjee, S. (2023). <em>Feynman’s Path Integral Explained with Basic Calculus</em>. SwaNi.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66371ee1c810" width="1" height="1" alt=""><hr><p><a href="https://medium.com/technological-singularity/feynmans-path-integral-approach-to-quantum-mechanics-66371ee1c810">Feynman’s Path Integral Approach to Quantum Mechanics</a> was originally published in <a href="https://medium.com/technological-singularity">Technological Singularity</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Artificial Intelligence and Spicy Content]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/technological-singularity/artificial-intelligence-and-spicy-content-3106cb564707?source=rss----fac940e846d0---4"><img src="https://cdn-images-1.medium.com/max/1923/1*Aq8gsOfCwuAraEOV5sz6tw.png" width="1923"></a></p><p class="medium-feed-snippet">Hollywood and Only Fans may soon be out of business, as AI can captivate the human audience better, faster, more consistently, in more&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/technological-singularity/artificial-intelligence-and-spicy-content-3106cb564707?source=rss----fac940e846d0---4">Continue reading on Technological Singularity »</a></p></div>]]></description>
            <link>https://medium.com/technological-singularity/artificial-intelligence-and-spicy-content-3106cb564707?source=rss----fac940e846d0---4</link>
            <guid isPermaLink="false">https://medium.com/p/3106cb564707</guid>
            <category><![CDATA[relationships]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[society]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[sex]]></category>
            <dc:creator><![CDATA[John Ege]]></dc:creator>
            <pubDate>Mon, 20 May 2024 08:59:56 GMT</pubDate>
            <atom:updated>2024-05-20T08:59:56.901Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Integration by parts — LIATE rule]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/technological-singularity/integration-by-parts-liate-rule-091a84d4b475?source=rss----fac940e846d0---4"><img src="https://cdn-images-1.medium.com/max/800/0*siTWTSXyfjqeE6nV.png" width="800"></a></p><p class="medium-feed-snippet">The technique of integration by parts can often be used for solving complex integrals, particularly if we need to integrate a function&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/technological-singularity/integration-by-parts-liate-rule-091a84d4b475?source=rss----fac940e846d0---4">Continue reading on Technological Singularity »</a></p></div>]]></description>
            <link>https://medium.com/technological-singularity/integration-by-parts-liate-rule-091a84d4b475?source=rss----fac940e846d0---4</link>
            <guid isPermaLink="false">https://medium.com/p/091a84d4b475</guid>
            <category><![CDATA[integration-by-parts]]></category>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[calculus]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[liate-rules]]></category>
            <dc:creator><![CDATA[Martin McBride]]></dc:creator>
            <pubDate>Mon, 20 May 2024 08:59:42 GMT</pubDate>
            <atom:updated>2024-10-21T20:16:16.987Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Is Math truely Logical?]]></title>
            <link>https://medium.com/technological-singularity/is-math-truely-logical-0033624401d3?source=rss----fac940e846d0---4</link>
            <guid isPermaLink="false">https://medium.com/p/0033624401d3</guid>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[education]]></category>
            <dc:creator><![CDATA[Kevin Shi]]></dc:creator>
            <pubDate>Mon, 20 May 2024 08:59:09 GMT</pubDate>
            <atom:updated>2024-05-20T08:59:09.251Z</atom:updated>
            <content:encoded><![CDATA[<h3>Is Math truly Logical?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*xCaVpKj837-JWAf3.png" /><figcaption><a href="https://www.freepik.com/premium-vector/deep-learning_3897946.htm">Freepik</a></figcaption></figure><p>You’ve probably been told that math is a <em>logical</em> subject. Perhaps, you know that to succeed in math, you should think logically. Each step should accurately, precisely, and logically follow from the previous step, based on a rigorous set of unforgiving assumptions. It is a boring, old-school subject restricting our creativity, requiring us to follow strict, unchanging rules, allowing only one right answer, and pushing us to think inside the box.</p><p>If you thought about math this way, then congratulations! You’re… well, <em>partially</em> correct. Why is that?</p><p>Let’s take a look at the definition of logic:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7pD3YUpNwLP2eGc_dhhLJA.png" /><figcaption>From Google</figcaption></figure><p>The first definition is what we’re looking for:</p><blockquote>Logic is defined as reasoning conducted or assessed according to strict principles of validity.</blockquote><p>First and foremost, yes, math requires logic. If you’ve done math at the upper elementary/middle school level, you might know that each expression must be logically connected to the previous and the next. Each step <em>implies </em>the next, meaning that it needs to be written with clear <strong>lines of reasoning </strong>and <strong>complete validity</strong>. In fact, the process of induction is seldom used in mathematical proof-writing, just to maintain the complete logical validity of mathematical statements (ironically, mathematical induction uses deductive reasoning; check that out for yourselves).</p><p>But, notice that the above process only happens when we <em>write </em>mathematics. It is one of the inherent traits of mathematics, and of most sciences, that your ideas must be expressed clearly and logically. The question is, does <em>logical communication</em> correspond to <em>logical thinking</em>?</p><p>Not really. It is sometimes true, and that may be the reason why many teachers link mathematics to <strong>logical thinking</strong>. However, even then, logical reasoning in mathematics is <em>very different</em> from what we typically consider logical reasoning, say, in a logic puzzle.</p><p>Let’s see an example of a typical example of logical reasoning used in a logic puzzle.</p><blockquote>One day a mad scientist lined up Andy, Brandy, Candy and Dandy in a row, so that each of them could see the ones in front of them but not behind. Andy was able to see everyone else while Dandy couldn’t see anyone. Then the mad scientist declared,</blockquote><blockquote><em>“There is a red hat, a blue hat, a white hat, and another hat that is either red, blue or white. I will place them on your heads, so that you can’t see the color of your own hat. However, you can see the hat color of anyone in front of you.”</em></blockquote><blockquote>Starting from the back (Andy first), he asked them each in turn what the color of their hat was. To his surprise, they all were able to correctly deduce the color of their hat based on the responses that they heard.</blockquote><blockquote>Which 2 people had the same color hats?</blockquote><p>Here’s a solution:</p><ul><li>If Andy had seen hats of 3 different colors, then he would not have been able to deduce his own hat color. Thus, he saw 2 hats of the same color and 1 hat of a different color.</li><li>If Bandy had seen 2 hats of different colors, then he would not have been able to determine his own hat color. Thus, he must have seen 2 hats of the same color, and then called out the remaining color.</li></ul><p>Thus, Candy and Dandy had hats of the same color.</p><p>This follows a very clear line of deductive reasoning, which goes by casework (exhaustively listing all cases), then continuing casework for each subcase until a contradiction is reached, eliminating the sub-cases. If you think about it, most logic puzzles have very strong <strong>implicit assumptions</strong>; in some sense, this makes them mere processes of guess-and-check, and a strict, final answer can always be reached through a limited number of such steps.</p><p>If you’ve ever gotten stuck on a math problem, you’ll realize that this isn’t the case. Let’s say you have to solve a simple quadratic equation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*gOZnz2dH7UAAP6x75sEdIg.png" /></figure><p>Assuming you have never seen this before, how are you going to guess and check? It definitely wouldn’t be a great idea if you tested all real values; if you were to use logical reasoning, and assuming you have some mathematical knowledge, you may want to somehow simplify this into a product of linear expressions.</p><p>The problem is, nothing is <em>guaranteed</em> to work. And, if you’re unlucky enough, you may test infinitely methods that <em>appear</em> logical and get nowhere. In fact, the odds of this happening increase as the problem gets more complex.</p><p>Logic puzzles do not correspond well to math problems, but more sophisticated, real-life decision-making may be a bit closer.</p><p>Let’s say you’re working for a country’s ministry of education. You see that there has been an increase in depression amongst middle school students, and you’re asked to analyze the topic.</p><p>Such a problem requires thorough use of logical reasoning, but you <strong>can’t proceed by elimination</strong>. At least, it would be very difficult, as there are theoretically infinitely many situations. Here, you would be making implicit assumptions to simplify the problem as you go, either based on your personal experiences or (more likely) objective data.</p><p>This comes a lot closer to mathematical reasoning and is the core of reasoning in most natural sciences. Interestingly, using very strict logical deduction may not get you anywhere, and there is no guarantee that you can resolve the problem in a finite number of attempts.</p><p>Now, the difference between such a reasoning process and mathematical reasoning mainly lies in <strong>abstraction</strong>. Not only acknowledge that some letter corresponds to an unknown value and know the definitions of each abstract symbol, but you have to understand everything logically and think in terms of abstract concepts.</p><p>In the education example, one knows that middle school students are likely experiencing puberty, enjoy playing, and don’t like to do homework. They may also know the special characteristics of middle school students in different geographical locations, and all of this information motivates them to choose an assumption and continue a certain line of reasoning. Similarly, each abstract concept in math provides its own <strong>motivation</strong>.</p><p>For instance, in the quadratic equation example, a motivation could be that squared terms increase much faster than linear terms (albeit, this isn’t very useful). However, compared to decision-making, it is harder for humans to conceive of such motivation in an abstract, mathematical context. After all, most of the motivations used in decision-making come from our observations in everyday life, and it’s much more tedious for our brains to observe the details in every abstract mathematical expression.</p><p>With the above examples, you probably realized that even when logical reasoning <strong>is used</strong> in a mathematical context, it is quite different from the logic and reasoning we’re typically used to. And, it is one of the reasons why despite subjects like biology, chemistry, economics, etc. all requiring the usage of <em>extensive</em> logical reasoning, people proficient in those areas may not be proficient in mathematics.</p><p>Now, there are also situations where logic and reasoning play a minimal role during the mathematical problem-solving process. It proves that math isn’t as boring and inside-the-box as you may think, having just as much room for creativity and imagination as most subjects. That’s a much more sophisticated topic, and I’ll probably discuss that at another time.</p><p>In the meantime, have you had any peculiar or difficult experiences with mathematics? If so, please feel free to share! Math may seem difficult for some, but it can be <strong>really fun </strong>once you get the gist of it. It’s saddening how schools make math such a painful experience. So, instead of relying on others, why not try it out for yourself?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0033624401d3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/technological-singularity/is-math-truely-logical-0033624401d3">Is Math truely Logical?</a> was originally published in <a href="https://medium.com/technological-singularity">Technological Singularity</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Diagonalising Matrices]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/technological-singularity/diagonalising-matrices-a0d79c92e7d7?source=rss----fac940e846d0---4"><img src="https://cdn-images-1.medium.com/max/800/1*jztRzrl4Au-tKAv2opfxUg.png" width="800"></a></p><p class="medium-feed-snippet">A diagonal matrix is a square matrix where every element except the leading diagonal is zero.</p><p class="medium-feed-link"><a href="https://medium.com/technological-singularity/diagonalising-matrices-a0d79c92e7d7?source=rss----fac940e846d0---4">Continue reading on Technological Singularity »</a></p></div>]]></description>
            <link>https://medium.com/technological-singularity/diagonalising-matrices-a0d79c92e7d7?source=rss----fac940e846d0---4</link>
            <guid isPermaLink="false">https://medium.com/p/a0d79c92e7d7</guid>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[eigenvectors]]></category>
            <category><![CDATA[matrix-algebra]]></category>
            <category><![CDATA[matrix]]></category>
            <category><![CDATA[technological-singularity]]></category>
            <dc:creator><![CDATA[Martin McBride]]></dc:creator>
            <pubDate>Tue, 14 May 2024 08:23:15 GMT</pubDate>
            <atom:updated>2024-05-14T08:23:40.163Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Redefining Education for the Age of AI: A Personal Journey with My Son]]></title>
            <link>https://medium.com/technological-singularity/redefining-education-for-the-age-of-ai-a-personal-journey-with-my-son-3f12499ab94b?source=rss----fac940e846d0---4</link>
            <guid isPermaLink="false">https://medium.com/p/3f12499ab94b</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[creative-thinking]]></category>
            <category><![CDATA[homeschooling]]></category>
            <dc:creator><![CDATA[Sumana Sethuraman]]></dc:creator>
            <pubDate>Fri, 10 May 2024 11:11:07 GMT</pubDate>
            <atom:updated>2024-05-14T15:13:11.829Z</atom:updated>
            <content:encoded><![CDATA[<h4>What should today’s education be like to meet the creative and problem solving needs in the era of advanced computers and AI?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*P_dhuPMRyvNERd8b.png" /><figcaption>Learning Counting in the Decimal System</figcaption></figure><p>I think this question can be answered thoroughly for each age and stage of the developing child.</p><p>Today, I want to share a small but significant incident involving my 10-year-old son, which led me to reflect deeper on how I facilitate his education.</p><p>It all started with an enlightening encounter I had with my son. After completing grade 4 through homeschooling, he now grasps numbers quantitatively and delights in manipulating and playing with them in his mind . He can add, subtract, multiply, and divide, transitioning smoothly from whole numbers to fractions and back . His joy in this understanding is palpable! Beyond mathematics, we explore every subject in a manner that resonates with the human being-child, fostering a deeper understanding of the world and, consequently, of themselves.</p><p>During the summer break, I introduced him to some Olympiad mathematics books, marking his first experience in applying his understanding to solve math problems in an MCQ exam format. Since then, I’ve been observing his self-motivated engagement with the material, which he thoroughly enjoys. Our educational approach has never been about just getting to the ‘right’ answers for tests. Instead, we delve into the true essence of the concept, in this case, the mathematical operations, steering clear of teaching abstract methods or procedures, too early, for solving equations by rote. This method prevents memorisation without (much) understanding. To genuinely teach a child how to add, subtract, multiply, or divide, we need to convey the real meaning behind these operations. This can be done through stories that are rooted in our real-world experiences, where all these operations boil down to ‘counting’.</p><p>Counting helps us make sense of the quantities we’re dealing with. For example, ‘adding’ means gathering more of something, so we count them all up. ‘Subtracting’ involves giving away, using, or consuming, which also requires counting to figure out what’s left. One can also view this more holistically or spiritually, as adding and subtracting are really parts of the same whole. For instance, energy is neither created nor destroyed; it only changes form. When I eat some apples and subtract them from the basket, there’s also an addition to my body, my health, and nutrition. This deeper understanding is what we aim to instil, making every concept a meaningful exploration of our world and ourselves.</p><p>Coming back to the encounter that served as a catalyst for these musings and this blog itself, an intriguing moment arose when my son encountered a long division problem presented in a traditional format, which momentarily puzzled him. His usual method involves mentally dividing or redistributing smaller, manageable portions of the dividend until it is fully accounted for, a process he understands and enjoys.</p><figure><img alt="Redefining education in the age of artificial intelligence (AI)" src="https://cdn-images-1.medium.com/max/1024/0*NzlL2u4GxuMfi-3J.png" /><figcaption>Understanding vs Rote Learning Long Division</figcaption></figure><p>However, the conventional, step-by-step division method presented in the problem seemed alien to him, prompting him to ask for my help to connect with what he knows. When I tried, his reaction, “not today, maybe later when I’m ready,” left me in awe of his innate sense of self-preservation, especially since he is at a developmental stage where the ability to think abstractly and make complex connections is still emerging. He was clear about not wanting to rote learn a method that didn’t make sense to him when he could do it in a way that he understands.</p><p><strong>This brings me to a critical inquiry for parents and educators:</strong></p><blockquote><em>In today’s fast-evolving technological landscape, what holds more value — comprehending the world and our interactions within it , OR mastering techniques to derive ‘correct’ answers?</em></blockquote><p>As computers and AI become increasingly capable of performing routine tasks, the traditional emphasis on rote learning seems increasingly redundant. Conventional education served society in the past by training individuals to develop certain mental labor skills, with or without understanding, as computers at the time did not fully support task forces due to economic reasons.But today, is that educational approach still relevant?</p><blockquote><em>What is the need for young children to learn the abstract methods of carrying, borrowing, canceling from numerator and denominator, among other brilliant but potentially obsolete shortcuts for arriving at the right answers, when what they truly need in today’s age is to understand the essence of their actions and their purpose?</em></blockquote><blockquote><em>Do we need speed tests — exams that time children to solve a certain number of questions within a certain time when AI will take over the mechanics and speed, and what humans really need is creative thinking power?</em></blockquote><p>Wouldn’t it be more beneficial to revisit the fundamentals of addition, subtraction, multiplication, and division in adolescence, when children are capable of making abstract associations and can thus fully appreciate the ingenuity of these traditional methods, devised by brilliant minds of the past for efficient manual calculations? At their age, adolescents can recognise how these procedures are logically coherent and how they relate to tangible, real-world operations.</p><p>This experience with my son serves as a small yet profound example urging us to reassess our educational strategies. It prompts us to consider whether it’s time to move beyond conventional methods that may no longer serve our needs.</p><p>What thoughts does this stir up in you?</p><p><strong>What other conventional ways can we break free from, especially when we can see that they really no longer serve us?</strong></p><p><strong>Connect with me on my </strong><a href="https://www.instagram.com/homeschooling_explorations"><strong>Instagram</strong></a><strong> to stay inspired.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f12499ab94b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/technological-singularity/redefining-education-for-the-age-of-ai-a-personal-journey-with-my-son-3f12499ab94b">Redefining Education for the Age of AI: A Personal Journey with My Son</a> was originally published in <a href="https://medium.com/technological-singularity">Technological Singularity</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Some More on Game Theory]]></title>
            <link>https://medium.com/technological-singularity/some-more-on-game-theory-cedbd3784fe7?source=rss----fac940e846d0---4</link>
            <guid isPermaLink="false">https://medium.com/p/cedbd3784fe7</guid>
            <category><![CDATA[john-nash]]></category>
            <category><![CDATA[game-theory]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[economics]]></category>
            <dc:creator><![CDATA[PhiWhyyy!?!]]></dc:creator>
            <pubDate>Fri, 10 May 2024 11:10:48 GMT</pubDate>
            <atom:updated>2024-05-10T11:10:48.339Z</atom:updated>
            <content:encoded><![CDATA[<h4>Some strategies that will help one draw strategic interactions between rational agents.</h4><blockquote>Not only are we in the universe, the universe is in us. — Neil deGrasse Tyson</blockquote><p>It’s fun how we humans call ourselves the losing freaks (when we miss, say, a damn concert or score one less) and manage to devise techniques to minimise loss (I sometimes feel like, yeah, so much work, screw it, but again!). So, optimizing is more of a clever person’s approach to neglecting something of lesser importance in their life. Well, can I then think of it as a behavioural pattern?</p><p>These questions bother me, and writing them for you all has become my resolve❤Game theory is one such topic that is as entertaining as the name suggests!</p><p>Game theory is the study of mathematical models examining strategic interactions between rational (hopefully non-biased) players. These strategic interactions involve decisions made by each player, considering other players&#39; actions and potential responses. The basic outline of Game Theory has been discussed here: <a href="https://medium.com/@phiwhyyy/concept-of-game-theory-and-saddle-points-18787f259a88"><strong>https://medium.com/@phiwhyyy/concept-of-game-theory-and-saddle-points-18787f259a88</strong></a><strong> </strong>(do check it out)</p><p>Game theory aims to determine the optimal strategy for each player, considering the potential outcomes and payoffs of different actions.</p><p><strong>Play-safe strategy</strong></p><p>When you wish to play safe, what do you do? You prefer to look for the worst outcome and select your best option accordingly. You prioritize minimizing potential losses and focus on conservative decision-making. This strategy is often employed when the potential gains are not high enough to justify taking risks. To give some practical examples, a player with a weak hand might choose to fold rather than risk losing more money in a poker game. In a business negotiation, a company may accept a lower offer rather than risk losing the deal altogether. In essence, the play-safe strategy in game theory involves prioritizing minimizing potential losses and making conservative decisions.</p><p>Let&#39;s take an example of a game called The Prisoner’s Dilemma. In the Prisoner’s Dilemma, two individuals are arrested for a crime and are placed in separate interrogation rooms. They are given the option to either confess to the crime or remain silent. The play-safe strategy in the Prisoner’s Dilemma would involve both individuals choosing to remain silent, as it minimizes the potential loss for each player. In this case, the play-safe strategy would be for both prisoners to prioritize minimizing their potential jail time and decide to remain silent. By employing the play-safe strategy, the prisoners effectively minimise their potential losses and make a conservative decision that prioritizes their interests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EL5n6aeVUqxW3owr" /><figcaption>Photo by <a href="https://unsplash.com/@brain1966?utm_source=medium&amp;utm_medium=referral">Rainer Bleek</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Zero-sum Strategy</strong></p><p>A zero-sum game is a strategy where an advantage is won on one side and lost by the other side. In a zero-sum strategy, the gains and losses of one player are directly balanced by the gains and losses of the other player. This means that the total payoff of the game is constant, and any gain for one player must come at the expense of the other.</p><p>Say we have a game where two players compete for a single prize. The zero-sum strategy in this game would involve both players adopting aggressive, competitive tactics to ensure that they gain the prize at the expense of their opponent. We can formulate the problem as a zero-sum game where the players’ strategies revolve around maximizing their gains while minimizing their opponent’s gains.</p><p><strong>Nash Equilibrium</strong></p><p>A Nash equilibrium is a strategy profile where each player best responds to the other players’ strategies. In other words, in a Nash equilibrium, no player has an incentive to deviate from their chosen strategy because doing so would result in a worse outcome. In layman&#39;s terms,it’s more than just facts and rules; it&#39;s what the player believes- an episode of their mental state.</p><p>John Nash was a Nobel laureate who significantly contributed to game theory, including the concept of Nash equilibrium. He introduced the idea that in a game, if each player chooses their best strategy given the choices of others, then a Nash equilibrium is reached. Furthermore, Nash equilibrium is a crucial concept in game theory that focuses on the stability and balance of strategies in a game (Kuhn &amp; Tucker, 1958).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JpBlr385VI08Tdps" /><figcaption>Photo by <a href="https://unsplash.com/@_purianoushka?utm_source=medium&amp;utm_medium=referral">Anoushka Puri</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Let’s discuss a few optimal mixed strategies in game theory. Optimal mixed strategies in game theory often involve a combination of different pure strategies to maximize the player’s expected payoff. In game theory, optimal mixed strategies are often employed when there is uncertainty about the actions or strategies of the other players. Therefore, by using a mixed strategy, a player can exploit their opponents’ unpredictability and potential weaknesses while maintaining ambiguity and flexibility in their actions.</p><p>For example, in a game of Rock-Paper-Scissors, an optimal mixed strategy would involve playing each move with equal probability. This ensures the player cannot be easily predicted by their opponent, as they are equally likely to choose any move. This strategy maximizes the player’s expected payoff by exploiting the uncertainty and unpredictability of their opponent’s moves. Another example of an optimal mixed strategy is in a game of matching pennies. An optimal mixed strategy in this game would involve randomly choosing heads or tails with equal probability. This strategic ambiguity makes it difficult for the opponent to guess and exploit a pattern in the player’s decision-making, resulting in a more balanced and unpredictable gameplay that can lead to optimal outcomes for the player.</p><p>In game theory, optimal mixed strategies are particularly relevant when players have imperfect or incomplete information about each other’s actions and intentions.</p><p>I enjoy Game Theory because it travels far beyond the books and plays with one’s intuition. Let&#39;s end this post with a problem.</p><p>Say, Phiwhyyy?!? Airlines (yes! :}) took a decision recently where they will allow the elderly (say 60+) and pregnant women to board earlier (provided they come at the allotted time), which would help their smooth boarding. This decision might initially cause a commotion but will be better for all as we know some elderly people might get disoriented in the crowd, especially if they are travelling alone. Also, pregnant women might need more time and care, especially when traveling alone. And if they decide to charge a bit extra (maybe 0.12% of the charge) for the smooth conduct of everything, it benefits both parties. What is your view of it from a game theory perspective?</p><p>The following can be considered references and inspiration for this blog:</p><p>Math Geek by Raphael Rosen</p><p><a href="https://www.ams.org/journals/bull/1958-64-03/S0002-9904-1958-10209-8/">American Mathematical Society</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cedbd3784fe7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/technological-singularity/some-more-on-game-theory-cedbd3784fe7">Some More on Game Theory</a> was originally published in <a href="https://medium.com/technological-singularity">Technological Singularity</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Guide: EigenDecomposition]]></title>
            <link>https://medium.com/technological-singularity/guide-eigendecomposition-ed0ca3ad4d34?source=rss----fac940e846d0---4</link>
            <guid isPermaLink="false">https://medium.com/p/ed0ca3ad4d34</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[linear-algebra]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Ayo Akinkugbe]]></dc:creator>
            <pubDate>Fri, 10 May 2024 08:23:21 GMT</pubDate>
            <atom:updated>2024-05-27T20:19:14.300Z</atom:updated>
            <content:encoded><![CDATA[<h4>An Overview of the Derivation and Applications of EigenValues and EigenVectors in Machine Learning</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FRhPGGe75ucr7k4tvAY34w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@izzyfisch_?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Isabella Fischer</a> on <a href="https://unsplash.com/photos/sliced-avocado-fruits-fvQH_s7qGgw?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><h3><strong>Introduction</strong></h3><p>Matrix are useful data structures in machine learning . However they could be complex in analysis. Matrix decomposition or factorization are mathematical processes of breaking down matrices. There are different types of matrix decomposition. Some examples are — Rank factorization, Cholesky decomposition, QR decomposition, Single Value Decomposition. This guide explores an important type of decomposition useful in machine learning based on the eigenvalues and eigenvectors of a matrix called eigendecomposition.</p><p>Eigendecomposition is the process of breaking a matrix into a set of eigenvalues and eigenvectors. What then are Eigen-values and Eigen-vectors? <strong>Eigenvectors are vectors when multiplied by a matrix only scale (increase in magnitude or size) but do not change direction</strong>. The amount this vectors are scaled by are refered to as their <strong>Eigenvalues.</strong> This follows that an eigenvector and matrix multiplication acts similar to an eigenvector and scalar multiplication. For a matrix M, It’s eigenvector V should follow the equation below.</p><p>MV= 𝝺V</p><p>where 𝝺 is the eigenvalue. In the equation, M is not equal to 𝝺. However, M has the same effect on V that 𝝺 has on V. It is important to note that <strong>only square matrices have eigenvectors and eigenvalues</strong>. Non-square matrices cannot be decomposed into eigenvectors and eigenvalues.</p><h3>Applications</h3><p>Why is it beneficial to understand eigendecomposition, eigenvalues and eigenvectors? For one, their applications are boundless. A number of machine learning problems can be resolved using Eigen-vectors and Eigen-values. Some examples include —</p><ul><li><strong>Principal Component Analysis</strong> — In principal component analysis (PCA), the eigenvectors of the covariance matrix are the principal components of the dataset examined. The corresponding eigenvalues are used to sort the principal components (eigenvectors) in the order they contribute most to the variance of the data. For example — for a dataset containing information about the heights, weights, age, and gender of individuals. PCA, using eigendecomposition can be used to find the principal components that best represent the variation in the dataset, potentially reducing the dimensions from four (height, weight, age and gender) to one (a single principal component).</li><li><strong>Data Compression</strong> — In data compression, eigendecomposition can be used to decompose an image data into a set of its base vectors, capture the essential features and reconstruct a high quality of the version of the original data.</li><li><strong>Graph Theory </strong>— In social network analysis, Eigenvalues and eigenvectors provide insights into properties such as connectivity, centrality, and clustering. The eigenvalues of the adjacency matrix (the matrix representing the connection between the vertices in a network) can be used to identify influential nodes (i.e individuals with high centrality ) within a social network.</li><li><strong>Eigenfaces</strong> : Eigenfaces is a technique in computer vision used for facial recognition that involves representing faces as linear combinations of eigenvectors obtained from a dataset of face images. For example — a dataset of face images could be used to compute the principal components (eigenfaces) using PCA. Each face image in the dataset is then represented as a weighted sum of these eigenfaces. During recognition, new face images are projected onto the eigenface space, and similarity measures are computed to identify the closest matches.</li><li><strong>Anomaly Detection</strong>: Eigenvalue-based anomaly detection methods leverage the eigenvalues of covariance matrices to detect outliers or anomalies in datasets. For instance, in a system monitoring application, measurements such as temperature, pressure, and humidity are collected over time. By computing the covariance matrix of these measurements and extracting its eigenvalues, anomalies can be detected based on deviations from the expected covariance structure. Anomalies may indicate potential faults or abnormal behavior in the system.</li><li><strong>Natural Language Processing </strong>— Eigendecomposition can be use to identify underlying structures and patterns in textual data.Techniques like GloVe (Global Vectors for Word Representation) use eigen decompositions or similar methods on word co-occurrence matrices to learn word embeddings. These embeddings capture semantic similarities between words based on their contexts in large text corpora, enabling tasks such as word similarity calculation, analogy reasoning, and language translation.</li></ul><h3>How to Find Eigen-Values</h3><h4>Theory</h4><p>For a matrix M, we can represent 𝝺 as the eigenvalue(s) and V as its eigenvector(s). From the definition,</p><p>MV= 𝝺V</p><p>MV- 𝝺V = 0</p><p>To factor out V which is a vector, an identity matrix I is introduced</p><p>(M- 𝝺I)V = 0</p><p>M-𝝺I = 0</p><p>Resolving resulting the system of equation would yield the eigenvalue 𝝺 of the matrix.</p><h4>Example</h4><p>For matrix M</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/141/0*FxnVQQ6G_jtyCpwh" /></figure><p>Writing the equation M-𝝺I = 0</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/0*cFL8XHT2RGtHE0Td" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/251/0*g2jEw3-fBUKXdRSO" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/0*IQVtZMPKTx2Aaf-5" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/0*_X6PRrQ87pyut3ob" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/278/0*AlwZjBBkle6VMdqV" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/217/0*N6nqs10IXosr4SJ4" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/237/0*BeRRtDhzEV9eaAzZ" /></figure><p>Therefore 𝝺 = 6 and 𝝺 = 2.</p><h3>How to Find Eigen-Vectors</h3><h4>Theory</h4><p>To find the eigenvectors, the equation (M- 𝝺I)V = 0 is used to derive a systems of equation which is then resolved using <em>Cramer’s rule</em> or <em>elementary row transformations.</em></p><h4>Example</h4><p>Using the same example above.</p><p>For matrix M</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/141/0*FxnVQQ6G_jtyCpwh" /></figure><p>with eigenvalues</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/156/0*GVsWmZymbvACi9iW" /></figure><p>for 𝝺 = 6</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/0*h50Xm865MFdo4OK3" /></figure><p>Setting up the equation (M−6I)V = 0</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/0*C5rpQhs4IyRA2KLu" /></figure><p>resolving the system of equations</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/182/0*wa-mopKGvtRXaUfy" /></figure><p>from the first equation,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/72/0*qlz3G61N6GghcUkI" /></figure><p>Substituting this into the second equation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/102/0*7VZi2uYbO6RpmHPq" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/67/0*0G81glltRvl8k3p0" /></figure><p>Therefore, any vector of the form</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/42/0*jCl2PcyPAWeksdpB" /></figure><p>where 𝑥 ≠ 0 is an eigenvector corresponding to 𝝺 = 6</p><p>for 𝝺 = 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/0*ULqDH7y9bAZcDYiQ" /></figure><p>Setting up the equation (M−2I)V = 0</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/211/0*0wE9M1ZdrI8ej7EW" /></figure><p>Resolving the system of equations</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/151/0*KvFI5CBDu0usXEPj" /></figure><p>It’s evident from the equations that</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/96/0*E4_Lbu5VxEh0xTj0" /></figure><p>Therefore any vector of the form</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/67/0*d4baKB8ryZLOTBSD" /></figure><p>where 𝑥 ≠ 0 is an eigenvector corresponding to 𝝺 = 2</p><h3>Python Implementation of Eigendecomposition</h3><p>Though its beneficial to understand how to derive eigenvalues and eigenvectors, the good news is with a few lines of code, they can be derived with Python.</p><p>The <em>linalg.eig </em>function in the numpy library returns a list of the eigenvalues and eigenvectors of the matrix.</p><pre>import numpy as np<br><br>M = np.array([[4, 2],<br>              [2, 4]])<br><br># Find eigenvalues and eigenvectors<br>eigenvalues, eigenvectors = np.linalg.eig(M)<br><br># Print eigenvalues and eigenvectors<br><br>print(&quot;Eigenvalues:&quot;)<br>print(eigenvalues)<br>print(&quot;\nEigenvectors:&quot;)<br>print(eigenvectors)</pre><p>Similar to the example, the eigenvalues are 6 and 2.</p><pre>print(&quot;First eigenvector:&quot;, eigenvectors[:,0])<br>print(&quot;Second eigenvector:&quot;, eigenvectors[:,1])</pre><p>Similar to the example, the output eigenvectors are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/0*MbL82B6LbxUutHjQ" /></figure><p>Also, the <em>linalg.eigh </em>function is give the same output while sorting the eigenvalues.</p><pre>import numpy as np<br><br>M = np.array([[4, 2],<br>              [2, 4]])<br><br># Find eigenvalues and eigenvectors for symmetric matrix<br>eigenvalues, eigenvectors = np.linalg.eigh(M)<br><br># Print eigenvalues and eigenvectors<br>print(&quot;Eigenvalues:&quot;)<br>print(eigenvalues)<br>print(&quot;\nEigenvectors:&quot;)<br>print(eigenvectors)</pre><h3>Eigen Properties of a Matrix</h3><ul><li>The determinant of a matrix is the product of its eigen-values.</li><li>If any eigenvalues are zero, it follows that the determinant is zero and hence the matrix does not have an inverse.</li><li>The trace of a matrix is equal to the sum of its eigenvalues.</li><li>The eigenvalues of a triangular matrix and diagonal matrices are the entries on its main diagonal.</li><li>If a matrix has eigenvalues 𝝺, it’s inverse matrix has eigen-values 1/𝝺</li></ul><h3>Conclusion</h3><p>Eigendecomposition, a process which which results in eigenvalues and eigenvectors associated with a square matrix has numerous application in machine learning. From Principal Component Analysis to Computer vision it’s usefulness in machine learning and artificial intelligence keeps growing in solving key problems. Understanding the basic concept could help unlock novel solutions to future problems.</p><blockquote>For more on AI/ML Guides 📝, Check out other posts in this <a href="https://medium.com/@ayoakinkugbe/list/aiml-guides-80f4736b904f">collection</a>:</blockquote><p><a href="https://medium.com/@ayoakinkugbe/list/80f4736b904f">AI/ML Guides</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed0ca3ad4d34" width="1" height="1" alt=""><hr><p><a href="https://medium.com/technological-singularity/guide-eigendecomposition-ed0ca3ad4d34">Guide: EigenDecomposition</a> was originally published in <a href="https://medium.com/technological-singularity">Technological Singularity</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beginner’s Guide to Plotting in Python]]></title>
            <link>https://medium.com/technological-singularity/beginners-guide-to-plotting-in-python-9b3e46f1d4ad?source=rss----fac940e846d0---4</link>
            <guid isPermaLink="false">https://medium.com/p/9b3e46f1d4ad</guid>
            <category><![CDATA[plotting]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[sympy]]></category>
            <category><![CDATA[matplotlib]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[M.Hamxa]]></dc:creator>
            <pubDate>Fri, 10 May 2024 08:22:59 GMT</pubDate>
            <atom:updated>2024-05-10T08:22:59.288Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="A light blue single line wave on a dark blue background." src="https://cdn-images-1.medium.com/max/1024/1*AGf1p63_oknou3794FGcyg.jpeg" /><figcaption>Image by Shahanaz Akter on pixabay</figcaption></figure><h4>SymPy and matplotlib</h4><p>Python is widely recognized as a go-to programming language among physicists for its capabilities in data visualization and mathematical programming.</p><p>Plotting in Python may seem intimidating at first, but once you become familiar with it, you’ll find that it’s actually quite straightforward. It’s just a matter of getting some practice and gaining confidence.</p><p>In this guide, we will focus on two specific libraries: Matplotlib and SymPy.</p><p>By the end of this guide, you will know how to create basic plots.</p><ol><li>Points and lines</li><li>Scatter plot</li><li>Polynomials</li><li>Multiple plots on same axis</li><li>Transcendental functions</li><li>Subplots</li><li>Plotting in SymPy</li><li>Multiple plots on same axis (SymPy)</li><li>3D plots</li><li>A Special Case</li><li>Piecewise functions</li><li>Surprise!</li></ol><p><strong>Installing Relevant Libraries:</strong></p><p>I use <strong>Jupytar Notebook</strong>. It can be accessed from <strong>Anaconda,</strong> which in turn can be downloaded from <a href="https://www.anaconda.com/download">https://www.anaconda.com/download</a>.</p><p>After Opening Jupyter Notebook, you will see <strong>New </strong>on the top extreme right. Click.</p><p>The interface would look something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nCEIrzXLkhrGeegafNhPcQ.jpeg" /><figcaption>interface of Jupyter notebook</figcaption></figure><p>Now, copy paste this into the first cell and press <strong>Ctrl+Enter</strong>. This will download relevant libraries.</p><pre>import sympy as sym<br>import matplotlib.pyplot as plt<br>import numpy as np<br>from IPython.display import display,Math</pre><p>Press the ‘<strong>+’ </strong>button on the toolbar to go to new cell. Now we are ready for some action.</p><h4><strong>1. Points and lines:</strong></h4><pre><br>plt.plot([-1,3],[-3,9])<br><br>#points are in form (x,y)<br><br>plt.plot(-1,-3,&#39;r*&#39;)<br>plt.plot(3,9,&#39;ro&#39;)<br>plt.axis([-4,5,-5,10])<br>plt.plot()<br><br>#Then press Ctrl+Enter to show the plot.</pre><p>[-1,3] refers to the domain of a line and [-3,9]refers to the range of line.</p><p><strong>plt.axis([a,b,c,d]) </strong>is for the x and y-axis limits of the plot respectively.</p><p>A number of markers can be used to show the points. Some are:</p><p>‘.’: Point marker ‘o’ : Circle marker ‘s’: Square marker ‘p’: Pentagon marker ‘*’: Star marker</p><p>r is used for the Red color.</p><p>The plot looks like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*8uBOXuxcADbSyFbpQ4FGig.jpeg" /></figure><h4><strong>2. Scatter Plots :</strong></h4><pre>x=[3.2,4.54,5.334,6]<br>y=[5,4,8.34,2.444]<br>plt.scatter(x,y)<br>plt.xlabel(&#39;x&#39;)<br>plt.ylabel(&#39;y&#39;)<br>plt.show()</pre><p>Scatter plots are an effective tool for correlation analysis, allowing us to determine whether data sets exhibit any relationship.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*jhsKp5MZx1kqk5ZLvJ6U2Q.jpeg" /></figure><h4><strong>3. Polynomials:</strong></h4><pre>x=np.linspace(-4,4,100) # values that need to be substitued in function<br>y=x**2+x**(3) # function<br>plt.plot(x,y,label= &#39;$x^2+x^3$&#39;,linewidth=2, \<br>         linestyle=&#39;--&#39;,color=&#39;b&#39;) # or color=(R,G,B).. (0,0,1)<br># dollar sign at start and end for latex format.<br><br># for linestyle you can also use<br>#&#39;-&#39;,&#39;--&#39;, &#39;:&#39;<br>    <br>plt.legend()<br>plt.ylim([-20,20])<br>plt.xlim([-10,10])<br>#or plt.axis([-10,10,-20,20])<br>plt.xlabel(&#39;x&#39;)<br>plt.ylabel(&#39;y&#39;)<br>plt.grid(True)<br>plt.show()</pre><p>np.linspace(-4, 4, 100) generates an array with 100 values between -4 and 4, including both endpoints. These values are substituted in ‘y’ and a plot is generated.</p><p>Thankfully, all this happens behind the scene. You only get to see a nice plot.</p><p>Now, for color coding,</p><p>‘b’: blue ‘g’: green ‘r’: red ‘c’: cyan ‘m’: magenta ‘y’: yellow ‘k’: black ‘w’: white.</p><p>RGB color coding can also be employed by adjusting the numbers within the (R, G, B) format.(1,1,0) would give you yellow; (1,0,0) would give you red. You can also get a mixture of colors by using values like (0.5,0.6,0.3).</p><p>The plot for the above code is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*8A4lzP1t4EWuJcyA8lTPhw.jpeg" /></figure><h4>4. <strong>Multiple plots on the same axis:</strong></h4><pre>x=np.linspace(-4,4,100) <br>y=x**2+x**(3) #function<br>g=1/x  #function<br>plt.plot(x,y,label= &#39;$x^2+x^3$&#39;,linewidth=2, \<br>         linestyle=&#39;--&#39;,color=&#39;b&#39;) <br>plt.plot(x,g,label=&#39;$1/x$&#39;,color=&#39;r&#39;)<br>    <br>plt.legend()<br>plt.ylim([-20,20])<br>plt.xlim([-10,10])<br>plt.xlabel(&#39;x&#39;)<br>plt.ylabel(&#39;y&#39;)<br>plt.grid(True)<br>plt.show() # all plots before before plt.show() will be shown on same<br>#plot</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*O68YvPmdAzPd9FQUogLn7g.jpeg" /></figure><h4><strong>5. Transcendental Functions:</strong></h4><pre>x=np.linspace(-4,4,200)<br>y=np.cos(x**2)+x**2<br>plt.plot(x,y,label=&#39;f&#39;)<br>plt.legend()</pre><p>For cos(x), sin(x), tan(x), log and exponential constant (e) use ‘ <strong>np. ’</strong>; they are a part of the NumPy library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*HThWX2hmZPIexjLIpinB8g.jpeg" /></figure><h4>6. Subplots:</h4><pre>x=sym.symbols(&#39;x&#39;)<br>xx=sym.symbols(&#39;xx&#39;)<br>x=np.linspace(-4,4,200)<br>xx=np.linspace(-10,10,200) # domain for 2nd (g) function.<br><br>f=np.cos(x**2)+x  #functions<br>g=np.exp(xx)      #functions<br><br>fig, axs = plt.subplots(1, 2, figsize=(8, 6))<br>#1 row and 2 columns<br><br># for f plot<br>axs[0].plot(x,f,label=&#39;f&#39;)<br>axs[0].set_xlabel(&#39;x&#39;)<br>axs[0].set_ylabel(&#39;f&#39;)<br>axs[0].legend()<br><br># for g plot<br>axs[1].plot(x,g,label=&#39;g&#39;,color=&#39;r&#39;)<br>axs[1].set_xlabel(&#39;x&#39;)<br>axs[1].set_ylabel(&#39;g&#39;)<br>axs[1].legend()<br><br>plt.show()</pre><pre>fig, axs = plt.subplots(1, 2, figsize=(8, 6))</pre><p>This function call creates a grid of subplots. The 1 represents the number of rows, and the 2 represents the number of columns.</p><p>figsize=(8, 6): This parameter sets the size of the figure in inches. You can adjust these values to suit your needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*InlIu8A0-Nx0kDY47uwOig.jpeg" /></figure><h4>7. Plotting in SymPy:</h4><p>SymPy has its own plotting module too. But it does not provide as much freedom as matplot lib does. Providing the domain of x is optional.</p><pre>x=sym.symbols(&#39;x&#39;)<br>y=sym.cos(x)*x**3<br>p=sym.plotting.plot(y,(x,-7.5,7.5),xlabel=&#39;x&#39;,ylabel=&#39;y&#39;,\<br>                 title=&#39;plot&#39;, legend=True, line_color=&#39;red&#39;)<br>#(x,-7.5,7.5) is the domain</pre><p>sym.symbols(&#39;x&#39;) is necessary. It is used to declare that ‘x’ will be used as an algebraic variable.</p><p>Here too, sym. is necessary before cos(x), sin(x), tan(x), cot(x), log and exponential constant (e).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*JUsaoQnUQvz1RbcESbvtgA.jpeg" /></figure><h4>8.Multiple plots on the same axis (SymPy):</h4><pre>x=sym.symbols(&#39;x&#39;)<br>y=sym.cos(x)*x**2<br>g=sym.exp(x)<br>p=sym.plotting.plot(y,(x,-7.5,7.5),xlabel=&#39;x&#39;,ylabel=&#39;y&#39;,\<br>                   legend=True, line_color=&#39;red&#39;, show=False)<br># (x,-7.5,7.5) is the domain: x values from -7.5 to 7.5<br>p.extend(sym.plotting.plot(g,(x,-7.5,7.5),show=False))<br>p.title=&#39;Functions&#39;<br>p.ylim = [-20,100] #y axis limit<br>p.xlim = [-10,10]  #x axis limits<br>p.show()</pre><p>p.extend() is used to plot the graph on same axis. I have used the variable p, any other word or letter could also be used.</p><p>show=False tells Python not to plot now. Instead, plot on the same axis when p.show() is called.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C_VNijnSCuyIhM92jycQRA.jpeg" /></figure><h4>9. 3D plots:</h4><pre>x,y=sym.symbols(&#39;x,y&#39;)<br>f=x**2+y  #function<br>#just add 3d after plot!<br>sym.plotting.plot3d(f,(x,-10,10),(y,-10,10))</pre><p>Since a multivariable function produces a 3d plot, we will use ‘x’ and ‘y’ as independent variables.</p><p>To plot, just use sym.plotting.plot3d .</p><p>Also — if you choose the domain of x, you must choose the domain of y too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*prbz2KmP0cltBpLOtt1sQw.jpeg" /></figure><h4>10.A Special Case:</h4><p>Several times we need to perform calculations on functions like finding their turning points — and also plot them. For that purpose, we use lambdify feature.</p><pre>x=sym.symbols(&#39;x&#39;)<br>y=(x)*sym.exp(x)<br><br>#I am trying to find turning point here<br>derivative=sym.diff(y)<br>display(Math(sym.latex(derivative)))<br>sol=sym.solve(derivative)<br>print(sol)<br><br>#plotting part<br>yxx=sym.lambdify(x,y) # to make a function callable<br>xx=np.linspace(-5,5,50) #domain of the function<br># easy way to remember: x is algebraic variable for algebraic<br>#manipulations. To plot a graph, we need another variable (xx) which<br># can be assigned a domain.<br>plt.plot(xx,yxx(xx),label=&#39;%s&#39; %(sym.latex(y)))<br>plt.ylim([-2,10])<br>plt.legend()<br>plt.grid(True)</pre><p>yxx=sym.lambdify(x,y) is the key here. The sym.lambdify feature allows you to convert symbolic expressions into callable functions, typically for numerical evaluation.</p><p>Do not forget to write yxx(xx) in plt.plot(xx,yy(xx)) .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*m4-0ZiGk0uVsfLFXa_3Aqg.jpeg" /></figure><h4>11.Piecewise functions</h4><pre>x=sym.symbols(&#39;x&#39;)<br>piece1 = x  # for x&lt;0<br>piece2 = sym.cos(x) # for x&gt;0 and x&lt;5<br>piece3 = 1/x   # for x&gt;=5<br><br># put them together<br>y = sym.Piecewise( (piece1,x&lt;0),(piece2,(x&gt;=0) &amp; (x&lt;5)),(piece3,x&gt;=5) )<br><br># making another xx variable to give domain to the function<br><br>xx = np.linspace(-5,25,100)<br>fxx = sym.lambdify(x,y)<br><br>plt.plot(xx,fxx(xx),&#39;b&#39;)<br>plt.xlabel(&#39;x&#39;)<br>plt.ylabel(&#39;f(x)&#39;)<br>plt.grid(True)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*O_0-gvpTaE-vpfzkQgfqIQ.jpeg" /></figure><p>sym.piecewise() is used to join all the components.</p><p>Piecewise functions are plotted by ‘lambdifying’ the function so it can become callable.</p><h4>12. A comic graph</h4><p>To make a plot which feels straight out of comic book, use with plt.xkcd(): before any plt command and indent all the lines below.</p><p>The last one will look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*8mpM1GeKPDG0aiCP4mGU1A.jpeg" /></figure><h4>Additional Info:</h4><ol><li>Parenthesis placement matters; a single omission can cause an error.</li><li>To add text in graph, plt.text(a,b,&#39;enter text&#39;, fontsize=12, color=&#39;red)1 where (a,b) are coordinates of text.</li><li>In sym.Piecewise(), P must be capitalized. Otherwise, Python gives error — ‘SymPy has no attribute piecewise’.</li><li>In sym.plotting.plot() you have to use line_color=for color, while in plt.plot()just color= .</li><li>Entering %matplotlib notebook at the start of code block would make the plot more aesthetic.</li><li>With practice, you’ll become familiar with the details and nuances, such as realizing that plt.show() is not always necessary.</li><li>plt.savefig(name.image format) saves the image of the plot; it can be accessed from <strong>File&gt;Open.</strong></li></ol><p>The codes I have uploaded are exact and working. You can experiment by changing the values and plotting them in your own notebook.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b3e46f1d4ad" width="1" height="1" alt=""><hr><p><a href="https://medium.com/technological-singularity/beginners-guide-to-plotting-in-python-9b3e46f1d4ad">Beginner’s Guide to Plotting in Python</a> was originally published in <a href="https://medium.com/technological-singularity">Technological Singularity</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>