diff options
| -rw-r--r-- | content/posts/linear_algebra.md | 21 | ||||
| -rw-r--r-- | layouts/_default/baseof.html | 67 | ||||
| -rw-r--r-- | layouts/partials/katex.html | 19 |
3 files changed, 74 insertions, 33 deletions
diff --git a/content/posts/linear_algebra.md b/content/posts/linear_algebra.md new file mode 100644 index 0000000..0be65f9 --- /dev/null +++ b/content/posts/linear_algebra.md @@ -0,0 +1,21 @@ ++++
+title = "Essence of Linear Algebra"
+date = 2026-04-14
+math = true
++++
+
+When I first encountered linear algebra in school, I failed to realize the profound impact it has on the world around us. At this moment all I could think of was that this was a tool to solve $n$ equations in $n$ unknowns. This recurred when I was studying Linear Algebra although at a higher level during my undergraduate studies. When studying for my master's degree I saw the gaping hole in knowledge I had in basic mathematics. Things my fellow students found intuitive would require me to spend time writing several equations. It was at this point that I realized that I needed a refresher course. At this moment I came across [Gilbert Strang's Lectures for MIT18.06](https://www.youtube.com/watch?v=7UJ4CFRGd-U&list=PLE7DDD91010BC51F8). This was a godsend. Without this course I do not think I would have my degree or a job. I even wrote an email to this effect to Prof. Strang who was also kind enough to respond and warm greetings. I find his [book](https://math.mit.edu/~gs/linearalgebra/ila6/indexila6.html) on this topic to be the definitive source of information on Linear Algebra. No article can hope to capture the effect that attending his lectures would. I highly recommend that you do it if you have the time. However if you are in need of a quick recap of its concept, I summarize my understanding of the course in a way that made sense. It is more of a reference for myself for the future when I might forget a thing or two. Here we go!
+
+## Vectors
+
+The fundamental unit of linear algebra is a vector. A vector is a collection of numbers that belong together. The most basic of which you might be familiar with as the cartesian coordinate system where the numbers represent the components along the $x$, $y$ and $z$ axes.
+
+$$ \mathbf{v} = \begin{bmatrix} x \\\\ y \\\\ z \end{bmatrix} $$
+
+But it doesn't have to be this literal. A vector can contain any information. A more realistic example could be a vector containing id of a car dealership, the number of sedans sold at the location, the total number of sales persons and the number of years the location has been active. Any set of related information can be added to a vector. Even words can be used by creating a numerical representation of it. This is what is done by LLMs. A vector is not limited in dimensions. The examples above have 3 and 4 dimensions or in mathematical terms in $\mathcal{R}^3$ and $\mathcal{R}^4$. But this can be extended to any random number of dimensions, $\mathcal{R}^n$. Vectors can be added together and scale. A linear combination is a generalization of combining vectors in different amounts. Notice that vectors are usually denoted in bold in mathematical notation.
+
+$$ \mathbf{y} = c_1 \mathbf{x}_1 + c_2 \mathbf{x}_2 + c_3 \mathbf{x}_3 $$
+
+## Matrices
+
+A matrix is a useful way of representing a transformation. A matrix is a set of vector as described in the earlier section stacked together horizontally. Another way of thinking of a matrix is as a transformation of basis. In 3 dimensions, the unit vector $x$ axis is defined by $\begin{bmatrix} 1 & 0 & 0 \end{bmatrix}$
\ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 012e942..0cb177d 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,36 +1,37 @@ <!DOCTYPE html> <html> - <head lang="en-gb"> - <meta charset="utf-8" /> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - {{- $title := ( .Title ) -}} - {{- $siteTitle := ( .Site.Title ) -}} - {{- if .IsHome -}} - <title> {{ $siteTitle }} </title> - {{- else -}} - <title> {{ $siteTitle }} | {{ $title }} </title> - {{- end -}} - <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" /> - <meta name="keywords" content="Karan, Jayachandra, Notes"> - <meta name="author" content="Karan Jayachandra"> - <link href="https://cdn.jsdelivr.net/npm/computer-modern@0.1.3/cmu-serif.min.css" rel="stylesheet"> - <link rel="stylesheet" type="text/css" media="screen" href="/main.css"/> - <link rel="icon" href="https://karanj.com/favicon-light.png" type="image/x-icon"> - <link rel="icon" href="https://karanj.com/favicon-dark.png" type="image/x-icon" media="(prefers-color-scheme: dark)"> - </head> - <body> - <div style="text-align: center; font-size: xx-large; font-weight: 900;">Karan Jayachandra</div> - <nav> - <ul> - <a href="/"><li>Home</li></a> - <a href="https://gitlab.com/KaranJayachandra"><li>Projects</li></a> - <a href="/resume.pdf"><li>Resume</li></a> - <a href="/posts"><li>Posts</li></a> - </ul> - </nav> - <main> {{- block "main" . }}{{- end }} </main> - <hr style="border-bottom: dotted 1px; border-top: none;"> - <footer>This content is licensed <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a></footer> - </body> + <head lang="en-gb"> + <meta charset="utf-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + {{- $title := ( .Title ) -}} + {{- $siteTitle := ( .Site.Title ) -}} + {{- if .IsHome -}} + <title> {{ $siteTitle }} </title> + {{- else -}} + <title> {{ $siteTitle }} | {{ $title }} </title> + {{- end -}} + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" /> + <meta name="keywords" content="Karan, Jayachandra, Notes"> + <meta name="author" content="Karan Jayachandra"> + <link href="https://cdn.jsdelivr.net/npm/computer-modern@0.1.3/cmu-serif.min.css" rel="stylesheet"> + <link rel="stylesheet" type="text/css" media="screen" href="/main.css"/> + <link rel="icon" href="https://karanj.com/favicon-light.png" type="image/x-icon"> + <link rel="icon" href="https://karanj.com/favicon-dark.png" type="image/x-icon" media="(prefers-color-scheme: dark)"> + {{if .Params.math }} {{ partial "katex.html" . }} {{end}} + </head> + <body> + <div style="text-align: center; font-size: xx-large; font-weight: 900;">Karan Jayachandra</div> + <nav> + <ul> + <a href="/"><li>Home</li></a> + <a href="https://gitlab.com/KaranJayachandra"><li>Projects</li></a> + <a href="/resume.pdf"><li>Resume</li></a> + <a href="/posts"><li>Posts</li></a> + </ul> + </nav> + <main> {{- block "main" . }}{{- end }} </main> + <hr style="border-bottom: dotted 1px; border-top: none;"> + <footer>This content is licensed <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a></footer> + </body> </html>
\ No newline at end of file diff --git a/layouts/partials/katex.html b/layouts/partials/katex.html new file mode 100644 index 0000000..4bb388c --- /dev/null +++ b/layouts/partials/katex.html @@ -0,0 +1,19 @@ +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous"> +<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script> +<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous"></script> +<script> + document.addEventListener("DOMContentLoaded", function() { + renderMathInElement(document.body, { + // customised options + // • auto-render specific keys, e.g.: + delimiters: [ + {left: '$$', right: '$$', display: true}, + {left: '$', right: '$', display: false}, + {left: '\\(', right: '\\)', display: false}, + {left: '\\[', right: '\\]', display: true} + ], + // • rendering keys, e.g.: + throwOnError : false + }); + }); +</script>
\ No newline at end of file |
