{"id":11,"date":"2018-11-26T01:53:00","date_gmt":"2018-11-26T01:53:00","guid":{"rendered":""},"modified":"2020-07-25T21:37:37","modified_gmt":"2020-07-25T19:37:37","slug":"simple-explanation-of-tensors-1-an-introduction","status":"publish","type":"post","link":"https:\/\/kindsonthegenius.com\/blog\/simple-explanation-of-tensors-1-an-introduction\/","title":{"rendered":"Simple Explanation of Tensors 1 &#8211; An Introduction"},"content":{"rendered":"<p><i>I have spent some time trying to understand tensors but I have spend more time trying to find an simple way to explain it to you.\u00a0<\/i><br \/>\nThe fact remains that to understand tensors, you need to take some time to think. But now I would try to make it easy be breaking it down into different chunks of short tutorials.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/4.bp.blogspot.com\/-hgY4aeTyuBs\/W_tOD5350wI\/AAAAAAAACf4\/tDeOO2HUv-oggh7Ercns-_mtcA16yqBbwCEwYBhgL\/s1600\/Simple%2BTutorials%2Bon%2BTensors.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/4.bp.blogspot.com\/-hgY4aeTyuBs\/W_tOD5350wI\/AAAAAAAACf4\/tDeOO2HUv-oggh7Ercns-_mtcA16yqBbwCEwYBhgL\/s320\/Simple%2BTutorials%2Bon%2BTensors.jpg\" width=\"320\" height=\"173\" border=\"0\" data-original-height=\"633\" data-original-width=\"1165\" \/><\/a><\/div>\n<p>What you are reading now is the very first part (<a href=\"https:\/\/kindsonthegenius.com\/blog\/\" target=\"_blank\" rel=\"noopener\">Simple Explanation of Tensors 1 &#8211; An Introduction<\/a>). So you have a good start. In this first part, we would cover the following:<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li><a href=\"https:\/\/kindsonthegenius.com\/blog\/simple-explanation-of-tensors-1-an-introduction#t1\">What is a Tensor(A Simple Definition)<\/a><\/li>\n<li><a href=\"https:\/\/kindsonthegenius.com\/blog\/simple-explanation-of-tensors-1-an-introduction#t2\">Note About Representation<\/a><\/li>\n<li><a href=\"#t3\">Review of Vectors<\/a><\/li>\n<li><a href=\"https:\/\/kindsonthegenius.com\/blog\/simple-explanation-of-tensors-1-an-introduction#t4\">Vector Transformation<\/a><\/li>\n<li><a href=\"https:\/\/kindsonthegenius.com\/blog\/simple-explanation-of-tensors-1-an-introduction#t5\">Representing Transformations<\/a><\/li>\n<\/ol>\n<p><ins style=\"display: block;\" data-ad-format=\"fluid\" data-ad-layout-key=\"-hk-o+30-4t+2k\" data-ad-client=\"ca-pub-7041870931346451\" data-ad-slot=\"6887528786\"><\/ins><br \/>\n<b><\/b><\/p>\n<h3 id=\"t1\">1. What is a Tensor(A Simple Definition)<\/h3>\n<p>Tensors are a type of data structure used in machine learning to represent various kinds of objects including\u00a0 scalars, vectors, arrays, matrices and other tensors.<br \/>\nSome define tensors as multidimensional arrays. We would use this definition later, when we would be performing some tensor operation using Python and R.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3 id=\"t2\">2. Note About Representation<\/h3>\n<p>We would represent a scalar with a variable in square brackets. For example [a] is a scalar, not just a number.<br \/>\nWe would represent the coordinate system using variable and subscripts. For example, the two dimiensional axes would be x<sub>1<\/sub>, x<sub>2<\/sub> axis and not x, y. Similarly the 3 dimensional axis would be x<sub>1<\/sub>, x<sub>2<\/sub>, x<sub>3<\/sub> axis and not x, y z.<br \/>\nThe reason for this is that we can&#8217;t determine the limits of the dimensions of data using 26 letters alphabets.<\/p>\n<p>This is illustrated in the figure:<\/p>\n<div style=\"clear: both; text-align: center;\"><\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/1.bp.blogspot.com\/-t8IylWiKn_g\/W_tO6aHhfHI\/AAAAAAAACgA\/ec_k5rvnCAQ8VcNBtSDWnrAGLt1mOwqewCLcBGAs\/s1600\/Three%2BDimensional%2BRepresentation.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/1.bp.blogspot.com\/-t8IylWiKn_g\/W_tO6aHhfHI\/AAAAAAAACgA\/ec_k5rvnCAQ8VcNBtSDWnrAGLt1mOwqewCLcBGAs\/s400\/Three%2BDimensional%2BRepresentation.jpg\" width=\"400\" height=\"145\" border=\"0\" data-original-height=\"395\" data-original-width=\"1086\" \/><\/a><\/div>\n<p>To represent a scalar we just need just a single number [x<sub>1<\/sub>], e. g 15<br \/>\nTo represent a vector we need two numbers [x<sub>1<\/sub>, x<sub>2<\/sub>] e.g [1, 3]<br \/>\nTo represent an object in 3 dimension we need [x<sub>1<\/sub>, x<sub>2<\/sub>, x<sub>3<\/sub>] e.g [2, 3, 1]<br \/>\nSame in four dimension and so on<\/p>\n<p>Now also note that a scalar is also a tensor of rank 1 (we would explain this later). A vector can be view as combination of two scalars. So a scalar is like a building block. (Remember from the definition of tensors that tensors are made up of other tensors.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3 id=\"t3\">3. Review of Vectors<\/h3>\n<p>A vector is normally viewed as a point in\u00a0 space. For a two dimensional space\u00a0 we would use two numbers. [2, 3]<br \/>\nFor three dimensional space, we would use three numbers [3, 4, 2]<br \/>\nVectors can also be represented as column of numbers.<\/p>\n<p><i>What does the numbers represent?<\/i><br \/>\nThe numbers does not represent distances along the the coordinate system. Rather, they represent direction. That is the endpoint coordinate the vector would reach if it were at the origin. This means that they don&#8217;t represent movement along the axis but direction in space.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3 id=\"t4\">4. Vector Transformation<\/h3>\n<p>Transformation refers to the changing of the coordinate system of a vector. In this case, the numbers representing the vectors change.<br \/>\nWe would consider a transformation from X to X&#8217;.<br \/>\nThe coordinate system X&#8217; has its origin at (5,0,0) of the first system X.<br \/>\nAssuming we have a vector [1,1,0]. This vector is at point (0,0,0) of the coordinate system X&#8217;.<br \/>\nIf we transform the coordinates from X&#8217; to X, what would happen to the vector [1,1,0]?<br \/>\nWhat would happen is that the it would remain the same [1,1,0]. It does not change, just the coordinates of its position changes.<\/p>\n<p>Why so?<br \/>\nSimply because, we did not move the vector! You only transformed the coordinate. The vector remains where it\u00a0 is! Sure this is fair enough.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3 id=\"t5\">5. Representing Transformation<\/h3>\n<p>Let&#8217;s represent the transformation of the coordinate with T and\u00a0 let&#8217;s call the vector V.<br \/>\nLet the transformation from X to X&#8217; be called T&#8217;<br \/>\nLet the the transformation from X&#8217; to X be called T.<br \/>\nLet&#8217;s call the vector V&#8217; after transformation from X to X&#8217;<\/p>\n<p>So we can write all of this in notations as:<\/p>\n<ul>\n<li>V&#8217; = T'(V)<\/li>\n<li>V = T(V&#8217;)<\/li>\n<\/ul>\n<p>You can read this, right?<\/p>\n<p>What have all of this got to do with Tensors?<br \/>\nThis is to let you know that there are transformation rules that applies to vectors.<br \/>\nWe have played around with scalars and tensors. So I would like to state the following for you<\/p>\n<ul>\n<li>Scalars are tensors of rank<\/li>\n<li>Vectors are tensors of rank 1<\/li>\n<\/ul>\n<p>Then comes the big question.<br \/>\nWhat the heck is a rank? We would continue this in Tutorial 2.<\/p>\n<p>Note: If you have any challenge following, let me know in the comment box below or to the left of this page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have spent some time trying to understand tensors but I have spend more time trying to find an simple way to explain it to &hellip; <\/p>\n","protected":false},"author":2,"featured_media":285,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[22],"tags":[],"_links":{"self":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/11"}],"collection":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":10,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":1065,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/11\/revisions\/1065"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/media\/285"}],"wp:attachment":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}