{"id":1027,"date":"2018-12-12T02:48:53","date_gmt":"2018-12-12T02:48:53","guid":{"rendered":"http:\/\/kusuaks7\/?p=632"},"modified":"2023-07-03T11:31:26","modified_gmt":"2023-07-03T11:31:26","slug":"learning-ai-if-you-suck-at-math-part6-math-notation-made-easy","status":"publish","type":"post","link":"https:\/\/www.experfy.com\/blog\/ai-ml\/learning-ai-if-you-suck-at-math-part6-math-notation-made-easy\/","title":{"rendered":"Learning AI If You Suck at Math &#8211; \u200aPart 6\u200a &#8211; Math Notation Made Easy!"},"content":{"rendered":"<p><strong><em>Ready to learn Machine Learning? Browse<\/em><\/strong> <strong><em><a href=\"https:\/\/www.experfy.com\/training\/tracks\/machine-learning-training-certification\">Machine Learning Training and Certification courses<\/a> developed by industry thought leaders and Experfy in Harvard Innovation Lab.<\/em><\/strong><\/p>\n<p>Welcome to part five of Learning AI if You Suck at Math. If you missed\u00a0<a href=\"https:\/\/www.experfy.com\/blog\/learning-ai-if-you-suck-at-math-part-1\">part 1<\/a>,\u00a0<a href=\"https:\/\/www.experfy.com\/blog\/learning-ai-if-you-suck-at-math-part-two-practical-projects\">part 2<\/a>,\u00a0<a href=\"https:\/\/www.experfy.com\/blog\/learning-ai-if-you-suck-at-math-part3-building-an-ai-dream-machine\">part3<\/a>, <a href=\"https:\/\/www.experfy.com\/blog\/learning-ai-if-you-suck-at-math-part4-tensors-illustrated-with-cats\">part4<\/a>, and <a href=\"https:\/\/www.experfy.com\/blog\/learning-ai-if-you-suck-at-math-part5-deep-learning-and-convolutional-neural-nets-in-plain-english\">part5<\/a>\u00a0be sure to check them out.<\/p>\n<p id=\"92c6\">If you\u2019ve followed parts\u00a0of this series you know that you really don\u2019t need a lot of math to get started with AI. You can dive right in with practical tutorials and books on the subject.<\/p>\n<p id=\"6ad4\"><strong>However, there are lots of reasons to learn mathematical notation.<\/strong><\/p>\n<p id=\"2bab\">Maybe you just want to stretch yourself and learn a new skill? Learning something outside of your comfort zone is a fantastic way to keep your mind sharp.<\/p>\n<p id=\"8115\">Or perhaps you\u2019d like to start reading a few of the papers on\u00a0<a href=\"https:\/\/arxiv.org\/list\/cs.AI\/recent\" target=\"_blank\" rel=\"noopener noreferrer\" data-href=\"https:\/\/arxiv.org\/list\/cs.AI\/recent\" data->arXiv<\/a>? You might even want to implement an exciting new research paper idea instead of waiting for someone else to put it on Github.<\/p>\n<p id=\"229c\">To do that you\u2019ll need to know how to read those funny little symbols.<\/p>\n<p id=\"0849\"><strong>Maybe the greatest reasons to learn math notation is that it let\u2019s you express complex ideas in a very compact way.<\/strong><\/p>\n<p id=\"9a4a\">Without it, it would take pages and pages to explain every equation.<\/p>\n<p id=\"7574\">Yet even with all the resources out there it can still be intimidating to face a string of those alien characters.<\/p>\n<p id=\"78e3\">Have no fear. I\u2019m here to help.<\/p>\n<p id=\"6fe3\">I\u2019ll show you that learning these symbols is not as hard as you think. But there are a few things holding you back.<\/p>\n<p id=\"7d0d\">First, if you\u2019re like me, you hated math as a kid. I\u2019ve discovered the key reason is that my teachers never bothered to answer the most important question:<\/p>\n<p id=\"2c2a\"><em>Why?<\/em><\/p>\n<p id=\"a78a\">Why am I doing this? How does this\u00a0<em>apply<\/em>\u00a0to my life?<\/p>\n<p id=\"c1d6\">They just slapped a bunch of equations on the board and told me to memorize them. That didn\u2019t work for me and I\u2019m betting it doesn\u2019t work for you.<\/p>\n<p id=\"5ff4\">The good news is that if you\u2019re interested in the exciting field of AI it\u2019s a great answer to that question!<\/p>\n<p id=\"03fe\">Now you have a\u00a0<em>reason to learn<\/em>\u00a0and\u00a0<em>apply it to real world problems<\/em>. The \u201cwhy\u201d is because you want to write a better image recognition program or an interface that understands natural language! Maybe you even want to write your own algorithms some day?<\/p>\n<p id=\"2dec\">The second thing holding you back is the plethora of horrible explanations out there. The fact is most people are not very good at explaining things. Most of the time people define math terms with more math terms. This creates a kind of infinite loop of misunderstanding. It\u2019s like defining the word \u201celephant\u201d by saying \u201can elephant is like an elephant.\u201d Great. Now I understand. Not!<\/p>\n<p id=\"76bf\">I\u2019ll help you get to firmer ground by relating it to the real world and using analogies to things that you already know.<\/p>\n<figure id=\"4ded\" data-scroll=\"native\"><canvas width=\"50\" height=\"75\"><\/canvas><img decoding=\"async\" style=\"width: 540px; height: 803px;\" src=\"https:\/\/cdn-images-1.medium.com\/max\/540\/1*Nqmh_0Vq80fF4lnf435IUQ.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/540\/1*Nqmh_0Vq80fF4lnf435IUQ.jpeg\" \/><\/figure>\n<p id=\"e23e\">I won\u2019t be able to cover all the symbols you need in one article, so you\u2019ll want to pick up this super compact guide to math symbols,\u00a0<a href=\"http:\/\/amzn.to\/2mVgWep\" target=\"_blank\" rel=\"noopener noreferrer\" data-href=\"http:\/\/amzn.to\/2mVgWep\" data-><strong>Mathematical Notation: A Guide for Engineers and Scientists<\/strong><\/a><strong>\u00a0<\/strong>by Edward R. Scheinerman, if you haven\u2019t already. (It was a late addition to my first\u00a0<a href=\"https:\/\/hackernoon.com\/learning-ai-if-you-suck-at-math-8bdfb4b79037#.wb9byq3o3\" target=\"_blank\" rel=\"noopener noreferrer\" data-href=\"https:\/\/hackernoon.com\/learning-ai-if-you-suck-at-math-8bdfb4b79037#.wb9byq3o3\" data->Learning AI if you Suck at Math<\/a>\u00a0article, but it\u2019s become one of my most frequently used books. It\u2019s filled with highlights and dog eared pages. As my knowledge of various math disciplines expands I find myself going back to that book again and again.<\/p>\n<p id=\"39fa\">Let\u2019s get rolling.<\/p>\n<p id=\"e7cb\">To start with,\u00a0<strong>what is an algorithm<\/strong>?<\/p>\n<p id=\"f2fa\">It\u2019s really nothing more than a series of steps to solve a particular problem. You use algorithms all the time whether you know it or not.<\/p>\n<p id=\"b44e\">If you need to pack lunch for the kids, drop them off at school and get your dry cleaning before heading to work you\u2019ve outlined a series of steps unconsciously to get from the kitchen to the office. That\u2019s an algorithm. If your boss gives you six assignments that are competing for your time, you have to figure out the best way to finish them before the end of the day by choosing which ones to do first, second, in parallel, etc. That\u2019s an algorithm.<\/p>\n<p id=\"8742\">Why is that important?\u00a0<strong>Because an equation is just a series of steps to solve a problem too.<\/strong><\/p>\n<p id=\"c7ea\">Let\u2019s start with some easy symbols and build up to some equations.<\/p>\n<p id=\"4cc1\"><strong>Math is about transforming things<\/strong>. We have an\u00a0<strong>input<\/strong>\u00a0and an\u00a0<strong>output<\/strong>. We plug some things into the variables in our equation, iterate through the steps and get an output. Computers are the same way. Now, most of the magic behind neural nets comes from three branches of math:<\/p>\n<ul>\n<li id=\"9842\"><strong>Linear Algebra<\/strong><\/li>\n<li id=\"b902\"><strong>Set theory<\/strong><\/li>\n<li id=\"0e11\"><strong>Calculus<\/strong><\/li>\n<\/ul>\n<p id=\"ca63\">What\u2019s a set? It\u2019s a collection of things, usually enclosed by curly brackets {} or square brackets. (Math peeps don\u2019t always agree on the best symbols for everything):<\/p>\n<figure id=\"f799\"><canvas width=\"75\" height=\"36\"><\/canvas><img decoding=\"async\" style=\"width: 586px; height: 293px;\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*CyLEiQ_7CALOWa62wQp6Ow.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*CyLEiQ_7CALOWa62wQp6Ow.jpeg\" \/><\/figure>\n<p style=\"text-align: center;\">A Set<\/p>\n<p id=\"7908\">Remember that\u00a0<a href=\"https:\/\/hackernoon.com\/learning-ai-if-you-suck-at-math-p4-tensors-illustrated-with-cats-27f0002c9b32#.g606budcf\" target=\"_blank\" rel=\"noopener noreferrer\" data-href=\"https:\/\/hackernoon.com\/learning-ai-if-you-suck-at-math-p4-tensors-illustrated-with-cats-27f0002c9b32#.g606budcf\" data->we looked at tensors in part 4<\/a>? That\u2019s a set.<\/p>\n<figure id=\"0fd6\"><canvas width=\"75\" height=\"61\"><\/canvas><img decoding=\"async\" style=\"width: 545px; height: 464px;\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*ia5MagzGp7_ZJX7x1AVNog.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*ia5MagzGp7_ZJX7x1AVNog.jpeg\" \/><\/figure>\n<p id=\"fb1f\"><strong>A set is usually indicated by a capital letter<\/strong>\u00a0variable such as\u00a0<strong>A<\/strong>\u00a0or\u00a0<strong>B<\/strong>\u00a0or\u00a0<strong>V<\/strong>\u00a0or\u00a0<strong>W<\/strong>. The letter itself doesn\u2019t much matter as long as you\u2019re consistent.<\/p>\n<p id=\"5c36\">However there are certain capital letters and symbols reserved for important, well known sets of numbers, such as:<\/p>\n<p id=\"0107\"><strong>\u2205 = An empty set ( a set with nothing in it yet ). By the way that symbol is a Greek letter called \u201cphi\u201d.\u00a0<\/strong>Greek letters are used frequently in math.\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Greek_letters_used_in_mathematics,_science,_and_engineering\" target=\"_blank\" rel=\"noopener noreferrer\" data-href=\"https:\/\/en.wikipedia.org\/wiki\/Greek_letters_used_in_mathematics,_science,_and_engineering\" data->You can see their upper and lowercase versions here<\/a>.<\/p>\n<p id=\"0679\"><strong>R<\/strong>\u00a0=\u00a0<strong>All real numbers<\/strong>\u00a0(Real numbers are pretty much every number that exists, including integers, fractions, transcendental numbers like Pi (\u03c0)(3.14159265\u2026) but not including imaginary numbers (made up numbers to solve impossible equations) and infinity.<\/p>\n<p id=\"0ca1\"><strong>Z = All the integers<\/strong>\u00a0(whole numbers without fractions, -1,-2, 0, 1, 2, 3 etc)<\/p>\n<p id=\"820b\">You can see a list of all the major reserved letters at the\u00a0<a href=\"http:\/\/www.mathsisfun.com\/sets\/number-types.html\" target=\"_blank\" rel=\"noopener noreferrer\" data-href=\"http:\/\/www.mathsisfun.com\/sets\/number-types.html\" data->Math is Fun website<\/a>.<\/p>\n<p id=\"b0f5\">All of these are sets and some of them are subsets, meaning they are wholly contained within the larger set like so:<\/p>\n<figure id=\"9c8f\"><canvas width=\"75\" height=\"41\"><\/canvas><img decoding=\"async\" style=\"width: 700px; height: 398px;\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*iCDWomITQDnNWTd56odX8Q.png\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*iCDWomITQDnNWTd56odX8Q.png\" \/><\/figure>\n<p style=\"text-align: center;\">Go ahead and look up what Q and N\u00a0mean!<\/p>\n<p id=\"f3a9\">In this case we would say that\u00a0<strong>Z (integers) is a subset of R (real numbers.)<\/strong><\/p>\n<p id=\"b981\">We could write that as such:<\/p>\n<ul>\n<li id=\"f077\"><em>A<\/em>\u00a0is a\u00a0<strong>subset<\/strong>\u00a0of ( included in)\u00a0<em>B:<\/em><\/li>\n<\/ul>\n<figure id=\"ccfc\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*mjBLF1pVCrmiqNq7LfXY5Q.jpeg\" data-height=\"56\" data-image-id=\"1*mjBLF1pVCrmiqNq7LfXY5Q.jpeg\" data-width=\"140\" \/><\/figure>\n<ul>\n<li id=\"ee9f\">Conversely,\u00a0<em>B<\/em>\u00a0is a\u00a0<strong>superset<\/strong>\u00a0of (or includes)\u00a0<em>A:<\/em><\/li>\n<\/ul>\n<figure id=\"2858\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*Sap4-fDwosoBUL5d0hx1Gg.jpeg\" data-height=\"56\" data-image-id=\"1*Sap4-fDwosoBUL5d0hx1Gg.jpeg\" data-width=\"137\" \/><\/figure>\n<p id=\"9152\">Now why would I care if set B contains all of set A? Good question.<\/p>\n<p id=\"a603\">Imagine that one set contains all the people who live in the United States, along with their age, address, etc. Now imagine that the other set contains people who have higher incidences of heart disease. The\u00a0<strong>overlap of the two sets<\/strong>\u00a0could tell me what areas of the country have more problems with heart disease.<\/p>\n<p id=\"e97e\">Each set has elements inside of it. What\u2019s an element? Just a part of the bigger set. Let\u2019s take a look at our tensor again.<\/p>\n<figure id=\"0897\"><canvas width=\"75\" height=\"44\"><\/canvas><img decoding=\"async\" style=\"width: 700px; height: 422px;\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*Di5DTLVHU4671a_xyj916w.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*Di5DTLVHU4671a_xyj916w.jpeg\" \/><\/figure>\n<p id=\"0557\">We denote elements of a set with a small italics variable, such as\u00a0<strong><em>x<\/em><\/strong>. We use the weird looking\u00a0<strong>E<\/strong>\u00a0<strong>like symbol<\/strong>\u00a0(though not an E) to denote that an element is a part of a set. We could write that as such:<\/p>\n<figure id=\"4f91\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*coQH1aa1uYV6MFYIERBOpA.jpeg\" data-height=\"73\" data-image-id=\"1*coQH1aa1uYV6MFYIERBOpA.jpeg\" data-width=\"172\" \/><\/figure>\n<p id=\"0fd3\">That means\u00a0<strong>x is an element of set A<\/strong>.<\/p>\n<p id=\"e7d9\">We could also say\u00a0<em>x<\/em>\u00a0is not an element of A:.<\/p>\n<figure id=\"d36f\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*-y9aohpBBcilFv8N80KBtQ.jpeg\" data-height=\"70\" data-image-id=\"1*-y9aohpBBcilFv8N80KBtQ.jpeg\" data-width=\"174\" \/><\/figure>\n<p id=\"1161\">The better you get at reading these symbols the more you can intelligently \u201ctalk through\u201d the string of characters in your mind. When you see the above now you can say \u201c<strong>x is not an element of set A<\/strong>\u201d. The better you can articulate what you\u2019re reading the closer you are to understanding it.<\/p>\n<p id=\"bd38\">Now, of course it\u2019s impractical to write out all the elements of a set, so we might write out all the elements in a series in a special way. So let\u2019s say we had a series of numbers increasing by one each time. We would write that as:<\/p>\n<p id=\"5fd0\"><strong>x = {1,2,3,4\u2026<em>n<\/em>}<\/strong><\/p>\n<p id=\"91a8\">The\u00a0<strong>dots just mean that the series continues until n,\u00a0<\/strong>where n<strong>\u00a0<\/strong>is a stand in variable for the \u201c<strong>end of the series<\/strong>.\u201d So if n = 10, the set contains the range of numbers from 1 to 10. If n = 100, that is the range of numbers from 1 to 100.<\/p>\n<h3 id=\"ec4d\">Equation Crazy<\/h3>\n<p id=\"045e\">Sets are interesting when we transform them with linear algebra. You already know most of the major algebra symbols like\u00a0<strong>+ for addition and \u2014 for subtraction<\/strong>.<\/p>\n<p id=\"e175\">Let\u2019s look at two new symbols and an equation. First the symbols:<\/p>\n<figure id=\"6c9a\"><canvas width=\"75\" height=\"16\"><\/canvas><img decoding=\"async\" style=\"width: 700px; height: 168px;\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*Ftstk6-VhnCWdL_lFUfjTw.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*Ftstk6-VhnCWdL_lFUfjTw.jpeg\" \/><\/figure>\n<p id=\"18a2\"><strong>What is a sum? It\u2019s the addition of all the numbers in a series.<\/strong>\u00a0Let\u2019s say we had a vector set\u00a0<strong>A<\/strong>\u00a0(remember that a vector is a single row or column of numbers) that contains:\u00a0<strong>{1,2,3,4,5}<\/strong>.<\/p>\n<p id=\"ce45\">The sum of that series would be:<\/p>\n<p id=\"8d96\"><strong>1 + 2 + 3 + 4 + 5 = 15<\/strong><\/p>\n<p id=\"6456\"><strong>The product is multiplication of all the numbers.<\/strong>\u00a0So if we take the same set A we get:<\/p>\n<p id=\"96d7\"><strong>1 x 2 x 3 x 4 x 5 =120<\/strong><\/p>\n<p id=\"0540\">We can represent an sum equation on a series of numbers compactly like this:<\/p>\n<figure id=\"6ad5\"><canvas width=\"69\" height=\"75\"><\/canvas><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*-pKp6_GqvCp5DrpHty1Xhw.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*-pKp6_GqvCp5DrpHty1Xhw.jpeg\" \/><\/figure>\n<p id=\"bfec\">So how do we read that? Simple. Check this out:<\/p>\n<figure id=\"dc43\"><canvas width=\"75\" height=\"25\"><\/canvas><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*PvlOgurtBcFoT-JOaVExEQ.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*PvlOgurtBcFoT-JOaVExEQ.jpeg\" \/><\/figure>\n<p id=\"005c\">We\u00a0<strong>start at the bottom<\/strong>\u00a0<strong>with j<\/strong>, which is a variable. We move\u00a0<strong>to the right and plug j into our expression<\/strong>. Lastly, we know\u00a0<strong>the series stops at the number given on the top<\/strong>. Let\u2019s see an example.<\/p>\n<figure id=\"05f4\"><canvas width=\"75\" height=\"25\"><\/canvas><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*qeAn3-0joU1VDgC_Wsw5AA.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*qeAn3-0joU1VDgC_Wsw5AA.jpeg\" \/><\/figure>\n<p id=\"63f4\">If you\u2019re a programmer, you might recognize this is a for loop!<\/p>\n<p id=\"148e\">Let\u2019s create a little function for this equation in Python:<\/p>\n<div id=\"e66d\"><span style=\"font-family: courier new,courier,monospace;\">def sum_x_range(x):<br \/>\nj = 1<br \/>\noutput = []\u00a0\u00a0 # creates an empty list<br \/>\nfor k in range(0,5):\u00a0 # starts a for loop<br \/>\nz = x**j\u00a0\u00a0\u00a0\u00a0\u00a0 # raises x to the power of j<br \/>\nj = j + 1\u00a0\u00a0\u00a0\u00a0 # raises j by 1 until it hits n which is 5<br \/>\noutput.append[z]\u00a0\u00a0 # append the output to a list<br \/>\nreturn sum(output)\u00a0 # sum all the numbers in the list<\/span><\/div>\n<div><span style=\"font-family: courier new,courier,monospace;\">print (sum_x_range(2))\u00a0\u00a0 # call the function with input 2 for x<\/span><\/div>\n<div><\/div>\n<p id=\"f4fc\">Forgive my hideous Python folks, but I\u2019m going for clear, not compact.<\/p>\n<p id=\"92be\">The ** symbol means to raise to the power of j. The function takes the variable x, which I supplied as 2. It then loops from 0 to 5 raising x by the power 1,2,3,4, 5 and appending those numbers to a list. It then runs a sum on that list to get the answer: 62<\/p>\n<h3 id=\"9169\">Enter the\u00a0Matrix<\/h3>\n<p id=\"eb15\">Remember that a 2D tensor is called a matrix. It\u2019s basically a spreadsheet, with rows and columns. First, you need to know how to refer to different parts of the matrix. This graphic lays it all out for you:<\/p>\n<figure id=\"acd7\"><canvas width=\"69\" height=\"75\"><\/canvas><img decoding=\"async\" style=\"width: 700px; height: 761px;\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*hObAvG7xjXJFKQRdLlcsYw.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*hObAvG7xjXJFKQRdLlcsYw.jpeg\" \/><\/figure>\n<p id=\"e8c9\">To start we have a<strong>\u00a0matrix A, which is denoted by a capital letter<\/strong>.<\/p>\n<p id=\"8729\">That matrix has\u00a0<strong><em>m rows<\/em><\/strong>\u00a0and\u00a0<strong><em>n columns<\/em><\/strong>, so we say it is an\u00a0<strong><em>m x n matrix, using small, italics letters<\/em><\/strong>.<\/p>\n<p id=\"8649\"><strong>Rows are horizontal, aka left to right. (Don\u2019t be confused by the arrows, which point to\u00a0<em>i<\/em>\u00a0and\u00a0<em>j<\/em>\u00a0NOT the row\u2019s direction. Again rows are horizontal!)<\/strong><\/p>\n<p id=\"2b40\"><strong>Columns are vertical, aka up and down.<\/strong><\/p>\n<p id=\"33e4\">In this case we have 4 x 5 matrix (aka a 2D tensor) because we have 4 rows and 5 columns.<\/p>\n<p id=\"207d\"><strong>Each box is an element of the matrix<\/strong>. The position of those elements is indicated by a\u00a0<strong>little italics\u00a0<em>a<\/em><\/strong>\u00a0as well as\u00a0<strong>a row indicator\u00a0<em>i<\/em>\u00a0<\/strong>and a<strong>\u00a0column indicator\u00a0<em>j<\/em><\/strong>.<\/p>\n<p id=\"d0d6\">So the 4 in the top row, second column is indicated by\u00a0<strong><em>a1,2<\/em><\/strong>. The 3 in the second row, first column is\u00a0<strong><em>a2,1<\/em><\/strong>.<\/p>\n<p id=\"3cca\">We won\u2019t have time to go over all the types of matrix math here, but let\u2019s take a look at one type to get your feet wet.<\/p>\n<p id=\"ce7e\">The dot product is a very common operation in neural networks so let\u2019s see it in action.<\/p>\n<h3 id=\"33ba\">Dot, Dot,\u00a0Dot<\/h3>\n<p id=\"3125\">The\u00a0<strong>dot product<\/strong>\u00a0is how we\u00a0<strong>multiply one matrix by another matrix<\/strong>.<\/p>\n<p id=\"447c\">The dot product operation is symbolized by, you guessed it, a dot.<\/p>\n<p id=\"3b31\"><strong>a\u00a0. b<\/strong><\/p>\n<p id=\"1e7a\">That\u2019s the dot product of two scalars (aka single numbers), which are individual elements inside our matrix.<\/p>\n<p id=\"cd57\"><strong>We multiply matching elements between matrices<\/strong>\u00a0of the same size and shape\u00a0<strong>and then sum up<\/strong>.<\/p>\n<p id=\"b18b\">Want to see the formula for multiplying one vector by another?<\/p>\n<figure id=\"4885\"><canvas width=\"75\" height=\"16\"><\/canvas><img decoding=\"async\" style=\"width: 700px; height: 168px;\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*XUhsPAQbvJEEpKtzyQftvQ.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*XUhsPAQbvJEEpKtzyQftvQ.jpeg\" \/><\/figure>\n<p id=\"aef4\">Take a deep breath. You got this!<\/p>\n<p id=\"6d52\">We know all these symbols now.<\/p>\n<p id=\"eba6\">This is the formula for\u00a0<strong>multiplying two equal length vectors<\/strong>. Remember from\u00a0<a href=\"https:\/\/hackernoon.com\/learning-ai-if-you-suck-at-math-p4-tensors-illustrated-with-cats-27f0002c9b32#.g606budcf\" target=\"_blank\" rel=\"noopener noreferrer\" data-href=\"https:\/\/hackernoon.com\/learning-ai-if-you-suck-at-math-p4-tensors-illustrated-with-cats-27f0002c9b32#.g606budcf\" data->part 4 of Learning AI if You Suck at Math \u2014 Tensors Illustrated with Cats\u00a0<\/a>that a vector is a single row or column of numbers.\u00a0<strong>Each row or column is an individual vector in our matrix.<\/strong><\/p>\n<p id=\"2a10\">Basically we\u00a0<strong>start at element one in matrix A<\/strong>\u00a0and\u00a0<strong>multiply it by element one in matrix B<\/strong>. Then we move on to element A2 multiplied by element B2.\u00a0<strong>We do this for all the elements until we reach the end, \u201cn\u201d, and then sum them up (aka add them together)<\/strong>.<\/p>\n<p id=\"e1d4\">Let\u2019s see a visual representation of that in action.<\/p>\n<figure id=\"807e\"><canvas width=\"75\" height=\"30\"><\/canvas><img decoding=\"async\" style=\"width: 700px; height: 285px;\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*nylC61biC9qoSjBHftY41A.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*nylC61biC9qoSjBHftY41A.jpeg\" \/><\/figure>\n<p id=\"2465\">Now we can plug these numbers into our formula:<\/p>\n<figure id=\"a010\"><canvas width=\"75\" height=\"5\"><\/canvas><img decoding=\"async\" style=\"width: 700px; height: 53px;\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*P4LMgakPRRuIj0Fde866lA.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*P4LMgakPRRuIj0Fde866lA.jpeg\" \/><\/figure>\n<p id=\"f9d8\">Here\u2019s another example for the next number in the output matrix.<\/p>\n<figure id=\"0e3b\"><canvas width=\"75\" height=\"30\"><\/canvas><img decoding=\"async\" style=\"width: 700px; height: 290px;\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*Md49O1HWWGbuRrU_jSGCcg.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*Md49O1HWWGbuRrU_jSGCcg.jpeg\" \/><\/figure>\n<figure id=\"40d9\"><canvas width=\"75\" height=\"2\"><\/canvas><img decoding=\"async\" style=\"width: 700px; height: 52px;\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*FzpB_nNWTQ0qGLUtV51cBQ.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*FzpB_nNWTQ0qGLUtV51cBQ.jpeg\" \/><\/figure>\n<p id=\"1fa3\">Here\u2019s the final matrix after we\u2019ve done all the math:<\/p>\n<figure id=\"5095\"><canvas width=\"75\" height=\"16\"><\/canvas><img decoding=\"async\" style=\"width: 700px; height: 168px;\" src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*DSEC4VCm_AP1R9w8hjqvNg.jpeg\" data-src=\"https:\/\/cdn-images-1.medium.com\/max\/720\/1*DSEC4VCm_AP1R9w8hjqvNg.jpeg\" \/><\/figure>\n<p id=\"d278\">These examples come from the amazing\u00a0<a href=\"http:\/\/www.mathsisfun.com\/algebra\/matrix-multiplying.html\" target=\"_blank\" rel=\"noopener noreferrer\" data-href=\"http:\/\/www.mathsisfun.com\/algebra\/matrix-multiplying.html\" data-><strong>Math is Fun website<\/strong><\/a>. That site has a ton of great examples. I haven\u2019t found any place that does it better so far.<\/p>\n<p id=\"6b6c\">I added in the formulas to aid your understanding of reading formulas since they tend to skip over those so as not to confuse people. But you don\u2019t have to be confused anymore.<\/p>\n<h3 id=\"16c1\">Winning Learning Strategies<\/h3>\n<p id=\"1010\">I want to finish up with a few strategies to help you learn faster.<\/p>\n<p id=\"2c5d\">I\u2019m an autodidact, which means I like to teach things to myself. I learn better when I have time to slow down and time to explore on my own. I make mistakes. My last article was a good example, as I had to correct a few bits.<\/p>\n<p id=\"2607\">But here\u2019s the thing about mistakes: They\u2019re a good thing!<\/p>\n<p id=\"8137\">They\u2019re part of the process. There\u2019s no getting around them, so just embrace them. If you\u2019re making mistakes you\u2019re learning. If you aren\u2019t, you aren\u2019t! Simple as that.<\/p>\n<p id=\"0676\">There\u2019s an old joke in engineering.<\/p>\n<p id=\"5a1b\"><strong>If you want to get the right answer, don\u2019t ask for help. Instead post the wrong answer and watch how many engineers jump in to correct you!<\/strong><\/p>\n<p id=\"ab9f\">Engineers just can\u2019t let wrong answers stand!<\/p>\n<p id=\"5b17\">It\u2019s an old trick but it works well.<\/p>\n<p id=\"39c5\">It\u2019s also important to note that you probably can\u2019t read the\u00a0<a href=\"http:\/\/amzn.to\/2mVgWep\" target=\"_blank\" rel=\"noopener noreferrer\" data-href=\"http:\/\/amzn.to\/2mVgWep\" data->Mathematical Notation book<\/a>\u00a0unless you\u2019ve plugged your way through some of the other books I outlined in\u00a0<a href=\"https:\/\/hackernoon.com\/learning-ai-if-you-suck-at-math-8bdfb4b79037#.wb9byq3o3\" target=\"_blank\" rel=\"noopener noreferrer\" data-href=\"https:\/\/hackernoon.com\/learning-ai-if-you-suck-at-math-8bdfb4b79037#.wb9byq3o3\" data->Learning AI if You Suck at Math \u2014 Part One<\/a>\u00a0or if you have a background in calculus, algebra and some geometry. You need a background for the terminology to make sense.<em>\u00a0However,<\/em>\u00a0<em>I recommend getting the book anyway, because as you work through the other books, you can use it as a reference guide<\/em>.<\/p>\n<p id=\"a5b2\">I also recommend taking a slow approach. There\u2019s no race here! You get no points for half-assing it. If you skip over a term you don\u2019t understand, you\u2019ll only end up having to go back to it.<\/p>\n<p id=\"1f13\">So STOP, take your time to look up EVERY symbol you don\u2019t understand. It\u2019s a slow and at times frustrating approach. But as you build up more and more knowledge it starts to go faster. You\u2019ll find yourself understanding terms you never imagined you could ever understand.<\/p>\n<p id=\"d3b3\">Also, know that you\u2019ll have to look things up from multiple locations. Let\u2019s face it, most people are not good teachers. They may understand the material but that doesn\u2019t mean they can make it accessible to others. Teaching is an art. That\u2019s why the Math is Fun site is vastly superior to Wikipedia when you are starting out. Wikipedia is \u201ccorrect\u201d but often dry, hard to understand and sometimes confusing. As you learn more about this maybe you can even make Wikipedia better.<\/p>\n<p id=\"b46a\">Keep all these things in mind and you can\u2019t go wrong in your AI learning adventures!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ready to learn Machine Learning? Browse Machine Learning Training and Certification courses developed by industry thought leaders and Experfy in Harvard Innovation Lab. Welcome to part five of Learning AI if You Suck at Math. If you missed\u00a0part 1,\u00a0part 2,\u00a0part3, part4, and part5\u00a0be sure to check them out. If you\u2019ve followed parts\u00a0of this series you<\/p>\n","protected":false},"author":393,"featured_media":24227,"comment_status":"open","ping_status":"open","sticky":false,"template":"single-post-2.php","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[183],"tags":[97],"ppma_author":[2209],"class_list":["post-1027","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-ml","tag-artificial-intelligence"],"authors":[{"term_id":2209,"user_id":393,"is_guest":0,"slug":"daniel-jeffries","display_name":"Daniel Jeffries","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","user_url":"","last_name":"Jeffries","first_name":"Daniel","job_title":"","description":"Dan Jeffries is an author, engineer and serial entrepreneur. During his two decades in the computer industry, he&#039;s covered a broad range of tech from Linux to networks and virtualization.&nbsp;"}],"_links":{"self":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/1027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/users\/393"}],"replies":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/comments?post=1027"}],"version-history":[{"count":2,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/1027\/revisions"}],"predecessor-version":[{"id":24229,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/1027\/revisions\/24229"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media\/24227"}],"wp:attachment":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media?parent=1027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/categories?post=1027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/tags?post=1027"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=1027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}