<?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[Stories by Utkarsh Mathur on Medium]]></title>
        <description><![CDATA[Stories by Utkarsh Mathur on Medium]]></description>
        <link>https://medium.com/@utkarsh.mathur?source=rss-9a9f0766e433------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NwwcvnPmIDPbNy1IVTRNug.jpeg</url>
            <title>Stories by Utkarsh Mathur on Medium</title>
            <link>https://medium.com/@utkarsh.mathur?source=rss-9a9f0766e433------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 06:22:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@utkarsh.mathur/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[LLM Part-2: Background for LLMs]]></title>
            <link>https://medium.com/@utkarsh.mathur/llm-part-2-background-for-llms-65ad7a7febb1?source=rss-9a9f0766e433------2</link>
            <guid isPermaLink="false">https://medium.com/p/65ad7a7febb1</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[emergent-abilities]]></category>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[llm-scaling-laws]]></category>
            <dc:creator><![CDATA[Utkarsh Mathur]]></dc:creator>
            <pubDate>Tue, 06 May 2025 02:59:11 GMT</pubDate>
            <atom:updated>2025-05-06T03:05:09.478Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UamPbMkqYnrDaLNea-3WHg.png" /><figcaption>Figure 1: Image generated by <a href="https://www.bing.com/">www.bing.com</a></figcaption></figure><p>Welcome to the second article of my LLM series. In the previous article I talked about the history of Language Models and their evolution which led to the development of Large Language Models. I laid specific emphasis on the differences between Pre-trained Language Models (<em>PLMs</em>) and Large Language Models (<em>LLMs</em>).</p><p><a href="https://medium.com/@utkarsh.mathur/llm-part-1-overview-history-and-background-5f2f17e1a8b4">LLM Part-1: History of Language Modeling</a></p><p>In this article I am going to talk about the background knowledge required to understand LLMs, i.e., LLM architectures, scaling laws, and emergent abilities. So, without further ado, let’s get into it.</p><h3>LLM Architectures</h3><p>I will first talk about the <a href="https://arxiv.org/abs/1706.03762"><strong><em>transformer</em></strong></a> architecture because they are the de facto backbones of most of the LLMs. I will then dive into the various kinds of LLM architectures commonly observed, and finally I will discuss a couple of emergent architectures to lookout for.</p><h4>Transformers</h4><p>It is impossible to understand the amazing capabilities of LLMs without understanding the transformer architecture. A typical transformer architecture (<em>Figure 2</em>) has 3 critical components, i.e., positional encoding layer, multi-headed attention layer, and feed forward layers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*ukPuYMCG8youlBA31wZQvQ.png" /><figcaption>Figure 2: Transformer Architecture (extracted from “Attention Is All You Need”)</figcaption></figure><p>The task of the <strong><em>positional encoding layer</em></strong> is to provide the model information of each word in the input or target sequence. This is usually done using combinations of trigonometric functions like sine or cosine to create continuous positional embeddings bounded in the range of -1 to 1.</p><p>Perhaps, the most critical component of transformer is <strong><em>multi-headed attention layer</em></strong> (<em>Figure 3</em>) as it is the main reason behind the amazing performance of transformers. Multi-headed Attention uses scaled dot-product attention in parallel to understand dependencies among different segments of input sequence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*hyB3H0mFIDpP9Bs0BHdOdg.png" /><figcaption>Figure 3: Multiheaded attention (extracted from “A Comprehensive Survey on Applications of Transformers for Deep Learning Tasks”)</figcaption></figure><p>Let’s now understand scaled dot-product attention. Transformers encode the input sequence into three matrices named Query (Q), Key (K), and Value (V); and then performs a combination of matrix multiplications to implement the below formula (<em>Figure 4</em>):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*RJ4ucfRmrtEJpfSQHvGnoA.png" /><figcaption>Figure 4: Scaled dot-product attention formula</figcaption></figure><p>This way multi-headed attention uses neural networks to capture and understand diverse characteristics of input data to encode long range dependencies.</p><p>The final important component is <strong><em>feed forward layer</em></strong> which helps in additional refinement of the output from multiheaded attention layer. The outputs from multi-headed attention and feedforward layers are added to their respective inputs to form a <strong><em>residual connection</em></strong> (<em>this is to address the vanishing gradient problem</em>) and then undergoes <strong><em>layer normalization</em></strong> (<em>to normalize the weights to reduce dependencies between layers</em>).</p><p>This is a very brief overview of the transformer architecture as a detailed explanation is beyond the scope of this article. If you wish to dive deep into the various nuances, I recommend <a href="https://medium.com/@vipra_singh/llm-architectures-explained-understanding-transformers-part-6-3a5573ed30e7"><em>this article</em></a> or “<a href="https://arxiv.org/abs/2306.07303"><em>A Comprehensive Survey on Applications of Transformers for Deep Learning Tasks</em></a>”</p><p><a href="https://medium.com/@vipra_singh/llm-architectures-explained-understanding-transformers-part-6-3a5573ed30e7">LLM Architectures Explained: Transformers (Part 6)</a></p><h4>Common LLM Architectures</h4><p>The commonly used LLM architectures can be divided into 4 categories:</p><ol><li><strong>Encoder — decoder architecture </strong>(T5): <em>These models use both encoder and decoder blocks such that the encoder blocks can access all the words in the initial input whereas the decoder blocks can only access the words occurring before a given word. These architectures are best suited for summarization, translation, or question answering.</em></li><li><strong>Encoder only architecture</strong> (BERT): <em>These models use only the encoder block and are great at understanding the full input sequence. They are great at sentence classification, name entity recognition, and extractive question answering tasks.</em></li><li><strong>Causal decoder architecture</strong> (GPT, BLOOM): <em>These models use the decoder blocks by applying unidirectional attention masking to ensure that each input token only attend to the current and the previous tokens. these are often referred to as “decoder only architectures” and they demonstrate exceptional in-context learning capabilities.</em></li><li><strong>Prefix decoder architecture</strong> (PaLM): <em>These models also only use the decoder blocks but apply bidirectional masking for prefix tokens (input sequence) and unidirectional masking for generated tokens helping the model to autoregressively predict the output token one-by-one.</em></li></ol><h4>Emerging Architectures</h4><p>I would now like to discuss two very promising architectures which can challenger the status quo of transformer backbones, i.e., <strong><em>State Space Models</em></strong> (SSMs) like <a href="https://arxiv.org/abs/2405.21060"><em>Mamba-2</em></a> and <a href="https://arxiv.org/abs/2502.09992"><strong><em>Diffusion Models</em></strong></a>. Both of these architectures have shown promising results and address different limitations of transformer based LLMs.</p><p><strong><em>Mamba models</em></strong> have SSM based architectures which allows them to scale linearly with tokens as compared to transformers which scale quadratically. These models are ideal cross-section of RNN and CNN architectures for sequential tasks which enables parallel computation like transformer with the added benefit of linear scaling.</p><p><a href="https://goombalab.github.io/blog/2024/mamba2-part3-algorithm/">State Space Duality (Mamba-2) Part III - The Algorithm</a></p><p><strong><em>Diffusion models</em></strong>, on the other hand, are truly generative models. They take an input sequence, corrupt it by adding noise to it, and then denoise the corrupted sequence to generate required output. These models generative the output in parallel as compared to token-by-token output of autoregressive models. They possess the ability of parallel generation, flexibility in correction of output, and are better at recovering error.</p><ul><li><a href="https://charanhu.medium.com/diffusion-language-models-dlms-a-new-frontier-in-text-generation-8fdafac17568">Diffusion Language Models (DLMs): A New Frontier in Text Generation</a></li><li><a href="https://towardsdatascience.com/llada-the-diffusion-model-that-could-redefine-language-generation/">LLaDA: The Diffusion Model That Could Redefine Language Generation | Towards Data Science</a></li></ul><blockquote>On a person level, I feel that diffusion models are ideal successors to transformer based LLMs as they may have better chances at solving complex instructional tasks given attention from the research community. The ability to generate textual output with flexibility for correction in previous tokens gives them an extraordinary edge over all autoregressive models.</blockquote><h3>Scaling Laws</h3><p>LLMs have Transformer architectures similar to pre-trained language models but they are larger in size, are trained on larger dataset, and have more total compute for orders of magnification. Research shows that scaling can largely improve model capacities, and these scaling effects can be quantitatively characterized by scaling laws. I’ll be discussing two scaling laws for Transformer language models and then I’ll dive into their applications.</p><h4>KM Scaling Law</h4><p><a href="https://arxiv.org/abs/2001.08361"><strong><em>KM Scaling Law</em></strong></a> was introduced by Open AI team in 2020. It puts forward a power-law relationship (<em>Figures 5–7</em>) of model performance with <strong><em>model size (N)</em></strong>, <strong><em>dataset size (D)</em></strong>, and <strong><em>amount of training compute (C )</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*7bwqVDxlrN2aL2DXaTo1Yw.png" /><figcaption>Figure 5: KM Scaling — Model Size</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*3Gu9Haqz7Q20EhW1GvOd0A.png" /><figcaption>Figure 6: KM Scaling — Dataset Size</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*4BtsekybNi-Ee5Yd0Rt_rQ.png" /><figcaption>Figure 7: KM Scaling — Total Compute</figcaption></figure><p>Here L(.) denotes cross entropy loss. A <a href="https://arxiv.org/abs/2010.14701"><em>follow-up study</em></a> from OpenAI shows that the language modelling loss can further be decomposed into two parts: <strong><em>reducible loss</em></strong> (<em>estimate of KL divergence between the data distribution and model distribution</em>) and <strong><em>irreducible loss</em></strong> (<em>the entropy of the data distribution</em>).</p><p>Given an increase in compute budget, C, KM Scaling Law favors a large increase in model size than data size.</p><p><a href="https://medium.com/@checkpoint89/scaling-laws-for-neural-language-models-fa1c0790833d">Scaling Laws for Neural Language Models</a></p><h4>Chinchilla Scaling Law</h4><p>In 2022, the Google DeepMind team proposed an <a href="https://arxiv.org/abs/2203.15556"><em>alternate scaling law</em></a> (<em>figure 8</em>) that instruct the optimal training of LLMs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*w3WbJYYPR1IBkiu6qSDHrA.png" /><figcaption>Figure 8: Chinchilla Scaling Law</figcaption></figure><p>The E is <strong><em>irreducible error</em></strong> part whereas the rest of the equation is <strong><em>reducible error</em></strong>. The team at DeepMind proposed optimizing the loss L (N, D) under the constraint C ≈ 6ND.</p><p>Given an increase in compute budget, Chinchilla scaling law suggest dataset size and model size should be increased in equal scales (<em>as alpha and beta have similar values in the scaling law equation</em>).</p><p><a href="https://medium.com/@raniahossam/chinchilla-scaling-laws-for-large-language-models-llms-40c434e4e1c1">Chinchilla Scaling Laws for Large Language Models (LLMs)</a></p><h4>Predictable Scaling</h4><p>The performance of LLMs can be reliably estimated from the performance of smaller models (<strong><em>predictable scaling</em></strong>). This means that scaling laws can be used to instruct the training of LLMs based on experimentations of smaller models. There are two main benefits of predictable scaling of LLMs:</p><ol><li>It allows experimentation of training tricks and techniques on smaller models which is more feasible than experimentations on large models.</li><li>It can help in identifying abnormal performances (<em>like training loss spike</em>) earlier saving time and resources associated with training of large models.</li></ol><p>There are couple of challenges with predictable scaling:</p><ol><li>Predictable scaling may indicate that <strong><em>diminishing return</em></strong> (<em>approaching irreducible loss</em>) can occur as models scale. However, some studies shows that representation quality and semantic content can still improve while approaching diminishing returns.</li><li>With the increasing model scale, the publicly available text data would soon be exhausted for training LLMs. This calls for studies on the effects of scaling laws on data-constrained regimes like data augmentation which may be used to address data scarcity.</li></ol><h4>Task-level Predictability</h4><p>Predictable scaling only refers to decrease in language modeling loss and not to improvement of downstream task performance. Intuitively, smaller language modeling loss tends to yield better downstream task performances like coding ability.</p><p>However, the phenomena of <strong><em>inverse scaling</em></strong> (<em>task performance deteriorates with decrease in modelling loss</em>) might also occur. Since task-level performance depends on task-related information like task metric or task difficulty, it is very tricky to characterize task-level scaling laws.</p><h3>Emergent Abilities</h3><p>Emergent Abilities are the primary distinguishing factor between LLMs and PLMs. These are the abilities to solve complex tasks which are not present in smaller models. Emergent abilities occurs when scale reaches a certain level, and performance rises significantly above random. Let us discuss the three typical emergent abilities of LLMs.</p><h4>In-context Learning</h4><p>In-context learning is the ability to generate expected output by completing the word sequence of input text without additional training given that the model has been presented with natural language instruction or task illustrations. This ability heavily relies on the specific downstream tasks as a task like addition or subtraction is easier to achieve than Question Answering.</p><h4>Instruction Following</h4><p>LLMs finetuned on <strong><em>instruction tuning</em></strong> (<em>mixture of multi-task datasets formatted via natural language descriptions</em>) are able to perform well on unseen tasks described as instructions. These models show better generalization ability as they are capable of following task instructions for new tasks without explicit examples.</p><h4>Step-by-step Reasoning</h4><p>LLMs, with <strong><em>chain-on-thought </em>(<em>CoT</em>)</strong> prompting strategy (<em>series of intermediate steps connecting the input and output</em>), can solve complex multi-step tasks by utilizing the prompting mechanism involving intermediate reasoning steps to derive final answer. This ability is speculated to have aroused by training language models on code.</p><p>Scaling laws and emergent abilities present two different perspectives for understanding the benefits of large models over small models. Scaling laws describes the predictable performance while emergent abilities describe the unpredictable performance spikes.</p><p>In the next article, I will be discussing the data collection and processing techniques for pre-training LLMs.</p><h3>References</h3><ol><li>W. X. Zhao <em>et al.</em>, “A Survey of Large Language Models,” <em>arXiv (Cornell University)</em>, Mar. 2023, doi: <a href="https://doi.org/10.48550/arxiv.2303.18223.">https://doi.org/10.48550/arxiv.2303.18223.</a></li><li>S. Minaee <em>et al.</em>, “Large Language Models: A Survey,” <em>arXiv (Cornell University)</em>, Feb. 2024, doi: <a href="https://doi.org/10.48550/arxiv.2402.06196.">https://doi.org/10.48550/arxiv.2402.06196.</a></li><li>S. Yin <em>et al.</em>, “A Survey on Multimodal Large Language Models,” <em>National Science Review</em>, Nov. 2024, doi: <a href="https://doi.org/10.1093/nsr/nwae403.">https://doi.org/10.1093/nsr/nwae403.</a></li><li>A. Vaswani <em>et al.</em>, “Attention Is All You Need,” <em>arXiv.org</em>, Dec. 05, 2017. <a href="https://arxiv.org/abs/1706.03762">https://arxiv.org/abs/1706.03762</a></li><li>Bing, “Bing,” <em>Bing.com</em>, 2000. <a href="https://www.bing.com/">https://www.bing.com/</a></li><li>U. Mathur, “LLM Part-1: History of Language Modeling — Utkarsh Mathur — Medium,” <em>Medium</em>, Apr. 24, 2025. <a href="https://medium.com/@utkarsh.mathur/llm-part-1-overview-history-and-background-5f2f17e1a8b4">https://medium.com/@utkarsh.mathur/llm-part-1-overview-history-and-background-5f2f17e1a8b4</a> (accessed May 06, 2025).</li><li>A. Vaswani et al., “Attention Is All You Need,” arXiv.org, Dec. 05, 2017. <a href="https://arxiv.org/abs/1706.03762">https://arxiv.org/abs/1706.03762</a></li><li>V. Singh, “LLM Architectures Explained: Transformers (Part 6) — Vipra Singh — Medium,” Medium, Nov. 10, 2024. <a href="https://medium.com/@vipra_singh/llm-architectures-explained-understanding-transformers-part-6-3a5573ed30e7#6dfb">https://medium.com/@vipra_singh/llm-architectures-explained-understanding-transformers-part-6-3a5573ed30e7#6dfb</a> (accessed May 06, 2025).</li><li>S. Islam et al., “A Comprehensive Survey on Applications of Transformers for Deep Learning Tasks,” arXiv.org, Jun. 11, 2023. <a href="https://arxiv.org/abs/2306.07303">https://arxiv.org/abs/2306.07303</a></li><li>T. Dao and A. Gu, “Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality,” <em>arXiv (Cornell University)</em>, May 2024, doi: <a href="https://doi.org/10.48550/arxiv.2405.21060.">https://doi.org/10.48550/arxiv.2405.21060.</a></li><li>S. Nie et al., “Large Language Diffusion Models,” arXiv (Cornell University), Feb. 2025, doi: <a href="https://doi.org/10.48550/arxiv.2502.09992">https://doi.org/10.48550/arxiv.2502.09992</a>.</li><li>G. A. Lab, “State Space Duality (Mamba-2) Part III — The Algorithm | Goomba Lab,” <em>Github.io</em>, 2024. <a href="https://goombalab.github.io/blog/2024/mamba2-part3-algorithm/">https://goombalab.github.io/blog/2024/mamba2-part3-algorithm/</a> (accessed May 06, 2025).</li><li>C. H. U, “Diffusion Language Models (DLMs): A New Frontier in Text Generation,” <em>Medium</em>, Oct. 24, 2024. https://charanhu.medium.com/diffusion-language-models-dlms-a-new-frontier-in-text-generation-8fdafac17568 (accessed May 06, 2025).</li><li>M. Wolf, “LLaDA: The Diffusion Model That Could Redefine Language Generation | Towards Data Science,” <em>Towards Data Science</em>, Feb. 26, 2025. <a href="https://towardsdatascience.com/llada-the-diffusion-model-that-could-redefine-language-generation/">https://towardsdatascience.com/llada-the-diffusion-model-that-could-redefine-language-generation/</a> (accessed May 06, 2025).</li><li>J. Kaplan et al., “Scaling Laws for Neural Language Models,” arXiv.org, Jan. 22, 2020. <a href="https://arxiv.org/abs/2001.08361v1">https://arxiv.org/abs/2001.08361v1</a></li><li>T. Henighan et al., “Scaling Laws for Autoregressive Generative Modeling,” Oct. 2020, doi: <a href="https://doi.org/10.48550/arxiv.2010.14701">https://doi.org/10.48550/arxiv.2010.14701</a>.‌‌</li><li>Checkpoint89, “Scaling Laws for Neural Language Models — Checkpoint89 — Medium,” Medium, Oct. 17, 2023. <a href="https://medium.com/@checkpoint89/scaling-laws-for-neural-language-models-fa1c0790833d">https://medium.com/@checkpoint89/scaling-laws-for-neural-language-models-fa1c0790833d</a> (accessed May 06, 2025).</li><li>J. Hoffmann et al., “Training Compute-Optimal Large Language Models,” arXiv.org, Mar. 29, 2022. <a href="https://arxiv.org/abs/2203.15556?ref=txt.cohere.com">https://arxiv.org/abs/2203.15556?ref=txt.cohere.com</a></li><li>Rania _Hossam, “Chinchilla Scaling Laws for Large Language Models (LLMs),” Medium, Sep. 07, 2023. <a href="https://medium.com/@raniahossam/chinchilla-scaling-laws-for-large-language-models-llms-40c434e4e1c1">https://medium.com/@raniahossam/chinchilla-scaling-laws-for-large-language-models-llms-40c434e4e1c1</a> (accessed May 06, 2025).</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65ad7a7febb1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LLM Part-1: History of Language Modeling]]></title>
            <link>https://medium.com/@utkarsh.mathur/llm-part-1-overview-history-and-background-5f2f17e1a8b4?source=rss-9a9f0766e433------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f2f17e1a8b4</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[language-model]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Utkarsh Mathur]]></dc:creator>
            <pubDate>Thu, 24 Apr 2025 01:24:57 GMT</pubDate>
            <atom:updated>2025-05-06T03:00:05.241Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MQmD41M64o38BQINybpp0Q.jpeg" /><figcaption>Image generated by <a href="https://www.bing.com/">www.bing.com</a></figcaption></figure><p>Since the release of <a href="https://arxiv.org/abs/2005.14165"><em>ChatGPT</em></a> in November 2022, Large Language Models (LLMs) have caught a lot of attention owing to their strong performance in a wide array of tasks. LLMs’ ability of general-purpose language understanding and generation is acquired by training billions of model’s parameters on massive amounts of text data, as predicted by <a href="https://arxiv.org/abs/2001.08361"><em>KM scaling law</em></a> and <a href="https://arxiv.org/abs/2203.15556"><em>Chinchilla Scaling Law</em></a>.</p><p>In this article, I will discuss the basic definition of Language Models and the evolution of Language Models (<em>Statistical Language Models, Neural Language Models, Pre-trained Language Models, and Large Language Models</em>).</p><h3>Language Modeling</h3><p><strong><em>Language</em></strong> is a prominent ability in human beings to express and communicate.</p><blockquote>“You shall know a word by the company it keeps” — J.R. Firth</blockquote><p><strong><em>Language Modeling</em></strong> aims to model the generative likelihood of word sequences, so as to predict the probabilities of future (or missing) tokens.</p><p>The literature of language models can be divided into four development stages (<em>figure 1</em>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*85SrgIoaAlYf9wDiwo9XYg.jpeg" /><figcaption>Figure 1 — Development Stages of Language Models</figcaption></figure><h4>Statistical Language Models (SLM)</h4><p>During the 1990s, researchers developed SLMs based on statistical learning methods. The word prediction models were based on <strong><em>Markov assumption</em></strong> (<em>next words depends on recent context</em>). The most commonly used models were <strong><em>n-gram language models</em> </strong>that predicts the next word based on the fixed context length of n-1 preceding words.</p><p>SLMs have been widely used to enhance performance in Information Retrieval and Natural Language Processing tasks. The major downside of these models is that they suffer from the <strong><em>curse of dimensionality</em></strong> owing to data sparsity in higher dimensions. This limitation has inspired several smoothing strategies like <a href="https://ieeexplore.ieee.org/document/1165125"><em>back-off estimation</em></a> and <a href="https://www.grsampson.net/AGTf.pdf"><em>good-turing frequency estimation</em></a>.</p><h4>Neural Language Models (<em>NLM</em>)</h4><p><a href="https://dl.acm.org/doi/10.5555/944919.944966"><em>Bengio et al</em></a> introduced the concept of distributed representation in 2003 which changed the direction of Language Modeling research. NLMs uses neural networks like <em>Multi-layer Perceptron</em> (MLP) and R<em>ecurrent Neural Networks</em> (RNNs) to learn <strong><em>distributed word representations</em></strong> (<em>embedding vectors</em>) and predict the next word based on aggregation of embedding vectors of previous words. These embedding vectors define a <strong><em>hidden space</em></strong> where the distance between two vectors can be used to define the similarity between words. NLMs are <strong><em>task-specific models</em></strong> as they are trained on task-specific data.</p><h4>Pre-trained Language Models (PLM)</h4><p>Since the introduction of <a href="https://arxiv.org/abs/1706.03762"><em>Transformers</em></a>, language models were developed to learn task-agnostic hidden embedding space with <strong><em>recurrent neural networks</em></strong> (<a href="https://aclanthology.org/N18-1202/"><em>ELMo</em></a>) or <strong><em>transformers</em></strong> (<a href="https://aclanthology.org/N19-1423/"><em>BERT</em></a> &amp; <a href="https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf"><em>GPT-2</em></a>) and pre-trained on large scale unlabeled data. The training and inference of PLMs follow the “<em>pre-training and fine-tuning</em>” paradigm such that they are pre-trained on unlabeled corpora (mostly from the web) for general tasks and then fine-tuned using small amounts of labeled data for downstream tasks. The pre-trained word representations are <strong><em>context-aware</em></strong> and are extremely effective as semantic features for general tasks allowing <strong><em>transferability across tasks</em></strong>.</p><h4>Large Language Models (LLM)</h4><p>LLMs, like <a href="https://arxiv.org/abs/2204.02311"><em>PaLM</em></a>, <a href="https://arxiv.org/abs/2302.13971"><em>LLaMA</em></a>, and <a href="https://arxiv.org/abs/2303.08774"><em>GPT-4</em></a>, are transformer-based neural language models with parameters in the order of billions that are trained on massive text data. Due the large model size and training data, LLMs exhibit stronger language understanding and generational capabilities than PLMs.</p><p>What really sets LLMs apart from PLMs is that LLMs exhibits <strong><em>emergent abilities</em></strong> (ability to solve series of complex tasks). Popular LLMs like GPT-4 are publicly accessible which allows people all over the world to use them which is not the case for PLMs. Another major difference between LLMs and PLMs is that development of LLMs has forced researchers to wear the hats of engineers as well because of the need to perform large-scale data processing and distributed parallel computing.</p><p>The evolution of the research of Language Modeling has greater expanded the task scope of language models. LLMs are the latest echelon in the age-old research field of Language Modeling which has transitioned from task specific helping SLMs to task-agnostic feature learning NLMs to transferable context-aware PLMs to general purpose task solving LLMs.</p><p>Although we lack a deeper understanding of the source of emergent abilities and factors behind exceptional generation capabilities, it is clear that LLMs are a step further towards <strong><em>Artificial General Intelligence</em></strong> (AGI).</p><p>In the next article I will be discussing the background knowledge required to understand LLMs, specifically, transformer architecture, scaling laws, and emergent abilities.</p><p><a href="https://medium.com/@utkarsh.mathur/llm-part-2-background-for-llms-65ad7a7febb1">LLM Part-2: Background for LLMs</a></p><h3>References</h3><ol><li>W. X. Zhao <em>et al.</em>, “A Survey of Large Language Models,” <em>arXiv (Cornell University)</em>, Mar. 2023, doi: <a href="https://doi.org/10.48550/arxiv.2303.18223.">https://doi.org/10.48550/arxiv.2303.18223.</a></li><li>S. Minaee <em>et al.</em>, “Large Language Models: A Survey,” <em>arXiv (Cornell University)</em>, Feb. 2024, doi: <a href="https://doi.org/10.48550/arxiv.2402.06196.">https://doi.org/10.48550/arxiv.2402.06196.</a></li><li>S. Yin <em>et al.</em>, “A Survey on Multimodal Large Language Models,” <em>National Science Review</em>, Nov. 2024, doi: <a href="https://doi.org/10.1093/nsr/nwae403.">https://doi.org/10.1093/nsr/nwae403.</a></li><li>T. Brown <em>et al.</em>, “Language Models Are Few-Shot Learners,” <em>ArXiv (Cornell University)</em>, vol. 4, May 2020, doi: <a href="https://doi.org/10.48550/arxiv.2005.14165.">https://doi.org/10.48550/arxiv.2005.14165.</a></li><li>J. Kaplan <em>et al.</em>, “Scaling Laws for Neural Language Models,” <em>arXiv.org</em>, Jan. 22, 2020. <a href="https://arxiv.org/abs/2001.08361v1">https://arxiv.org/abs/2001.08361v1</a></li><li>J. Hoffmann <em>et al.</em>, “Training Compute-Optimal Large Language Models,” <em>arXiv.org</em>, Mar. 29, 2022. <a href="https://arxiv.org/abs/2203.15556?ref=txt.cohere.com">https://arxiv.org/abs/2203.15556?ref=txt.cohere.com</a></li><li>S. Katz, “Estimation of probabilities from sparse data for the language model component of a speech recognizer,” <em>IEEE Transactions on Acoustics, Speech, and Signal Processing</em>, vol. 35, no. 3, pp. 400–401, Mar. 1987, doi: <a href="https://doi.org/10.1109/tassp.1987.1165125.">https://doi.org/10.1109/tassp.1987.1165125.</a></li><li>W. G. Gale and G. Sampson, “Good‐turing frequency estimation without tears*,” vol. 2, no. 3, pp. 217–237, Jan. 1995, doi: <a href="https://doi.org/10.1080/09296179508590051.">https://doi.org/10.1080/09296179508590051.</a></li><li>BengioYoshua, DucharmeRéjean, VincentPascal, and JanvinChristian, “A neural probabilistic language model,” <em>Journal of Machine Learning Research</em>, Mar. 2003, doi: <a href="https://doi.org/10.5555/944919.944966.">https://doi.org/10.5555/944919.944966.</a></li><li>A. Vaswani <em>et al.</em>, “Attention Is All You Need,” <em>arXiv.org</em>, Dec. 05, 2017. <a href="https://arxiv.org/abs/1706.03762">https://arxiv.org/abs/1706.03762</a></li><li>M. Peters <em>et al.</em>, “Deep Contextualized Word Representations,” <em>Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers)</em>, vol. 1, 2018, doi: <a href="https://doi.org/10.18653/v1/n18-1202.">https://doi.org/10.18653/v1/n18-1202.</a></li><li>J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding,” <em>Proceedings of the 2019 Conference of the North</em>, vol. 1, 2019, doi: <a href="https://doi.org/10.18653/v1/n19-1423.">https://doi.org/10.18653/v1/n19-1423.</a></li><li>A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, and I. Sutskever, “Language Models are Unsupervised Multitask Learners,” 2019. Available: <a href="https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf">https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf</a></li><li>Aakanksha Chowdhery <em>et al.</em>, “PaLM: Scaling Language Modeling with Pathways,” <em>arXiv (Cornell University)</em>, Apr. 2022, doi: <a href="https://doi.org/10.48550/arxiv.2204.02311.">https://doi.org/10.48550/arxiv.2204.02311.</a></li><li>H. Touvron <em>et al.</em>, “LLaMA: Open and Efficient Foundation Language Models,” <em>arXiv (Cornell University)</em>, Feb. 2023, doi: <a href="https://doi.org/10.48550/arxiv.2302.13971.">https://doi.org/10.48550/arxiv.2302.13971.</a></li><li>OpenAI, “GPT-4 Technical Report,” <em>arXiv (Cornell University)</em>, Mar. 2023, doi: <a href="https://doi.org/10.48550/arxiv.2303.08774">https://doi.org/10.48550/arxiv.2303.08774</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f2f17e1a8b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Numerical Mathematics: Part 3]]></title>
            <link>https://medium.com/@utkarsh.mathur/numerical-mathematics-part-3-bae1639cb6dc?source=rss-9a9f0766e433------2</link>
            <guid isPermaLink="false">https://medium.com/p/bae1639cb6dc</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[numerical-analysis]]></category>
            <category><![CDATA[university-at-buffalo]]></category>
            <category><![CDATA[algebra]]></category>
            <dc:creator><![CDATA[Utkarsh Mathur]]></dc:creator>
            <pubDate>Sun, 05 Mar 2023 07:41:24 GMT</pubDate>
            <atom:updated>2023-03-05T07:41:24.195Z</atom:updated>
            <content:encoded><![CDATA[<p>In the last article, I talked about Matrix and its operations and properties. Today, I’ll discuss Linear Systems.</p><p><a href="https://medium.com/@utkarsh.mathur/numerical-mathematics-part-2-2568007b2d20">Numerical Mathematics: Part 2</a></p><h3>Linear System</h3><p>A linear system is one where there are multiple unknowns of polynomials of order 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BPiAcxX6nspTXsgBFzseIw.png" /></figure><p>A <strong>system of linear equations</strong> is multiple coupled linear equations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xzBptkpWxdSKJ5J5fJqB-Q.png" /></figure><p>Suppose the above three equations are given to us as our system of linear equations. Here, all the aᵢⱼ and bᵢ are known to us where as all the xᵢ’s are the variables. This system of equations can be represented as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*in7GtHILNnJcTVD-RI8jFQ.png" /></figure><p>In general, <strong>Ax = b</strong> is used to represent a <strong>system of linear equations</strong>. If the <em>det(A)</em> ≠ 0, A⁻¹ exists, thus, <strong>x = A⁻¹b</strong>. Otherwise, if <em>det(A)</em> = 0, A⁻¹ does not exist, yet a solution to <strong>Ax = b</strong> exists.</p><p>When it comes to solutions of a system of linear equations there are only 3 possibilities.</p><ol><li><strong>One unique solution</strong>: This is the case when <em>det(A)</em> ≠ 0.</li><li><strong>Infinite number of equations</strong>: This is one of the cases of <em>det(A)</em> = 0.</li><li><strong>No solution</strong>: This is another case of <em>det(A)</em> = 0.</li></ol><p>We’ll talk about these cases in-depth later.</p><h3>Gaussian Elimination</h3><p>Gaussian Elimination is one of the most commonly used methods to solve a system of linear equations. In this method, we declare an augmented matrix from equation <strong>A</strong>x = b as [ <strong>A</strong> | b ]. The goal of this method is to transform the augmented matrix into a new augmented matrix [ I | b₁ ] where <strong>I</strong> is the identity matrix and b₁ is the solution to the system of linear equations.</p><p>This is achieved using row operations:</p><ol><li>Swapping rows.</li><li>Multiplying rows with a non-zero scalar.</li><li>Adding row.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sIpFOBw50HZntAVCeJWTsg.png" /><figcaption>Example of Gauss-Jordan Elimination</figcaption></figure><p>The original Gaussian Elimination Method transforms our matrix into its <strong>Row Reduced Echelon Form</strong> and then calculates each unknown one by one.</p><p>Let us talk more about the <strong>Row Reduced Echelon Form (RREF)</strong>. An RREF is in the form of an echelon (stairs or ranks). Each pivot (first non-zero element of a row) element in an RREF is equal to one and each column with a pivot can have no non-zero values except for the pivot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cWtYtbGc-ZmnHvgsQ2TcZA.png" /></figure><p>The RREF of an augmented matrix tells us about the number of solutions of the system of linear equations.</p><ol><li><strong>One Unique Solution</strong>: If the number of pivots is equal to the number of rows and columns in A then we have one unique solution.</li><li><strong>Infinite Solutions</strong>: If the number of pivots is less than the number of rows and columns in A and all rows of RREF of the augmented matrix are <strong>consistent</strong> (explained below) then we have infinite solutions. The columns with pivots give <strong>fixed variables</strong> (fixed values) and the columns without pivots give <strong>free variables</strong> (can assume any value giving infinite solutions).</li><li><strong>No Solution</strong>: If the number of pivots is less than the number of rows and columns in A and all rows of RREF of the augmented matrix are <strong>inconsistent</strong> (explained below) then we have no solution.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sdVABoBMD2WdjsPsqcluRQ.png" /></figure><p>Gaussian Elimination Algorithms (<em>Contains information about pivoting</em>)-</p><p><a href="https://drive.google.com/file/d/1A_8b9AvpEv0efLdtB4yet5Ur_iqFA8cf/view?usp=sharing">Gaussian Elimination.pdf</a></p><p>Gaussian Elimination MATLAB Code-</p><p><a href="https://github.com/datamathur/EAS501-Codes/blob/main/gaussian_elimination.m">EAS501-Codes/gaussian_elimination.m at main · datamathur/EAS501-Codes</a></p><p>Gaussian Elimination Python Code-</p><p><a href="https://github.com/datamathur/EAS501-Codes/blob/main/Gaussian%20Elimination.py">EAS501-Codes/Gaussian Elimination.py at main · datamathur/EAS501-Codes</a></p><p>In this article, we explored a system of linear equations and the Gaussian Elimination method to find solutions. There are many other numerical and analytical methods to solve a system of linear equations like the Gauss-Seidel technique, LU decomposition, and Successive Over Relaxation but the Gaussian method is the most commonly used in applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bae1639cb6dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Numerical Mathematics: Part 2]]></title>
            <link>https://medium.com/@utkarsh.mathur/numerical-mathematics-part-2-2568007b2d20?source=rss-9a9f0766e433------2</link>
            <guid isPermaLink="false">https://medium.com/p/2568007b2d20</guid>
            <category><![CDATA[university-at-buffalo]]></category>
            <category><![CDATA[algebra]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[numerical-analysis]]></category>
            <dc:creator><![CDATA[Utkarsh Mathur]]></dc:creator>
            <pubDate>Wed, 01 Mar 2023 01:26:06 GMT</pubDate>
            <atom:updated>2023-03-01T01:44:24.741Z</atom:updated>
            <content:encoded><![CDATA[<p>In the previous article, we discussed vectors and their operations and properties. Today, I’m gonna talk about a crucial mathematical tool called “Matrix”. So without further ado, let’s get going!</p><p><a href="https://medium.com/@utkarsh.mathur/numerical-mathematics-for-data-scientists-part-1-c89b9674751b">Numerical Mathematics for Data Scientists: Part 1</a></p><h3>Matrices</h3><p>A <strong>matrix</strong> is a 2-dimensional collection of numbers. Often denoted in capital letters, a matrix with <em>m rows</em> and <em>n columns</em> has the <strong>size</strong> or <strong>dimension</strong> <strong>m</strong> x <strong>n</strong>.</p><p>The component of a matrix A in row i and column j is given by aᵢⱼ.</p><p>Matrices can also be considered collections of vectors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nzSQ0liXXi3XfSMZh7m34Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DgzEfuBptWDa4xaalyRa-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pPKBY9W6Rs-YfeFfsmHXMA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xLUhUIXIX_eGyovVhIqIUg.png" /></figure><p>A matrix is symmetric if and only if A = Aᵗ. To be symmetric a matrix needs to be square, rectangular matrices can never be symmetric.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2trUYWObDC4gb6ktnvAFg.png" /></figure><p>Identity Matrix (I) is a square matrix with 1 on diagonal elements and 0 elsewhere. It is a matrix with the property { <strong>A</strong> x <strong>I</strong> = <strong>I</strong> x <strong>A</strong> = <strong>A</strong> }, hence the name identity matrix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Eu_w_QJ_pBJ6QOeoERIXOQ.png" /></figure><h3>Matrix Operations</h3><h3>1. Addition</h3><p>Addition is possible between equally sized matrices. If A and B are matrices in <strong>m</strong> x <strong>n</strong> matrix space then, <strong>C</strong> = <strong>A</strong> + <strong>B</strong> means <strong>cᵢⱼ</strong> = <strong>aᵢⱼ</strong> + <strong>bᵢⱼ</strong>.</p><h3>2. Matrix-Vector Product</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8zE3DYEwjg2KTmtPCgu07g.png" /></figure><p><strong>Ax</strong> = <strong>B</strong> can also be denoted in index notation as <strong>aᵢⱼxⱼ</strong> = <strong>bᵢ</strong>.</p><p><strong>A</strong> and <strong>x</strong> must be compatible, which means that if the size of <strong>A</strong> is <strong>m</strong> x <strong>n</strong> and the size of <strong>x</strong> is <strong>p</strong> x <strong>1</strong>, then <strong>A</strong> and <strong>B</strong> are compatible if and only if <strong>n</strong> = <strong>p</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NbpXTtOiS3YzpqTZQsWh1Q.png" /></figure><p>A matrix-vector product is a linear combination of the column vectors of the matrix.</p><p>You can also get a row vector as a result of a matrix-vector product. Let <strong>A</strong> be a matrix in <strong>m</strong> x <strong>n</strong> matrix space and <strong>x</strong> be a vector in <strong>m</strong> x <strong>1</strong> vector space. In this case, <strong>Ax</strong> is only defined if <strong>n</strong> = <strong>m</strong>, and <strong>xA</strong> is undefined as <strong>1</strong> ≠ <strong>p</strong>. This is where we define <strong>xᵗA</strong> which gives us a <strong>1</strong> x <strong>n</strong> row vector.</p><h3>3. Matrix-Matrix Product</h3><p>Let A be a m x n dimension matrix and B be a p x q dimension matrix. In this case, <strong>AB</strong> is defined when <strong>n</strong> = <strong>p</strong> giving a <strong>m</strong> x <strong>q</strong> dimension matrix and <strong>BA</strong> is defined when <strong>m</strong> = <strong>q</strong> giving a <strong>p</strong> x <strong>n</strong> matrix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7aVkok9faNveK8bXgIV09w.png" /></figure><p><strong>AB</strong> = <strong>C</strong> implies <strong>aᵢₖbₖⱼ</strong> = <strong>cᵢⱼ</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-F0Hx8RwVIkIuHnzJ5OxzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*92y9oK5Ngp7-7iDzP7gZ7w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lk4n7LXUzMsQ1gOfrzBiHg.png" /></figure><h3>4. Powers</h3><p><strong>Aᵖ</strong> = <strong>A</strong> x <strong>A</strong> x <strong>A</strong> … (<strong>p</strong> times).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GMiLwGoJVCFaInaykXAm0Q.png" /></figure><h3>5. Trace</h3><p><strong>Trace of a matrix A</strong> is defined as the sum of all the diagonal elements of a <strong>n</strong> x <strong>n</strong> square matrix and denoted by <strong>tr(A)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*dLYqB6ThFR6HqhFApsRnkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wz0q660-R341elwp7XWdpA.png" /></figure><h3>6. Outer Product</h3><p>Outer Product is an operation on vectors producing a matrix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tvA68En0kdoSuELcQUELEw.png" /></figure><h3>Determinant of a Matrix</h3><p><em>I’ve written an article on this very topic which is referenced below. Please give it a read.</em></p><p><a href="https://medium.com/@utkarsh.mathur/determinant-of-a-matrix-numerical-linear-algebra-part-2-24c0036bded8">Determinant of a Matrix</a></p><h3>Matrix Inverse</h3><p>The inverse of a matrix is only defined for square matrices. Let <strong>A</strong> and <strong>B</strong> be two matrices in <strong>n</strong> x <strong>n</strong> matrix space. <strong>A</strong> and <strong>B</strong> are called inverses of each other if and only if <strong>AB</strong> = <strong>BA</strong> = <strong>I</strong>. If so, we denote <strong>A⁻¹</strong> = <strong>B</strong>.</p><p>You can easily show that det(<strong>A⁻¹</strong>) = (det(<strong>A</strong>))⁻¹.</p><ol><li>If det(A) ≠ 0, then det(<strong>A⁻¹</strong>) is defined, hence <strong>A⁻¹ </strong>must exist.</li><li>If det(<strong>A</strong>) = 0, then det(<strong>A⁻¹</strong>) is undefined, hence <strong>A⁻¹ </strong>does<strong> </strong>not exist.</li></ol><p><em>In summary, Matrix is a very important mathematical concept and is crucial for Engineers and Data Scientists. Its significance can be estimated by the fact that the mathematical operations of MATLAB are completely performed around matrices.</em></p><p><em>In the next article, I’ll discuss Linear Systems. Till then keep learning and prosper. Thanks!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2568007b2d20" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Numerical Mathematics for Data Scientists: Part 1]]></title>
            <link>https://medium.com/@utkarsh.mathur/numerical-mathematics-for-data-scientists-part-1-c89b9674751b?source=rss-9a9f0766e433------2</link>
            <guid isPermaLink="false">https://medium.com/p/c89b9674751b</guid>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[university-at-buffalo]]></category>
            <category><![CDATA[numerical-analysis]]></category>
            <category><![CDATA[algebra]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Utkarsh Mathur]]></dc:creator>
            <pubDate>Tue, 28 Feb 2023 03:23:35 GMT</pubDate>
            <atom:updated>2023-06-28T18:19:41.273Z</atom:updated>
            <content:encoded><![CDATA[<p>This article series is dedicated to Numerical Mathematics which is inspired from courses MIT 18.06 — Linear Algebra and EAS 501 — Numerical Mathematics for Data Scientists that is being taught to me here at UB this semester. I’ll be sharing short yet explanatory notes on the various topics taught in these course and try to give my verdict on how they could be useful for Data Scientists.</p><p>Hey there! I am an MS student at UB focusing in Data Science and I’ve come here to share my learnings from various courses that I’ll be studying in this remarkable journey.</p><p>Feel free to drop your comments along the way and I’ll try to be consistent in replying to them. Without further ado, let us begin.</p><h3>Vectors</h3><p>A <strong>vector</strong> is an organized collection of numbers (also known as components). Also known as tuples, a vector’s length is determined by the number of components in it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cEGaxPiO-Q_1wUh1g8XuhQ.png" /></figure><p>It is important to note that although the lengths of vectors a and b are the same, i.e. 3, the vectors a and b are different vectors. For two vectors to be equal to each other, the vectors must have all their components to be the same.</p><p>Vectors are of two types, namely, row vectors and column vectors. Although it is very clear by the nomenclature, yet to be clear, both vectors a and b are column vectors.</p><p>The dimensions of a vector are m x n, where m represents the number of rows and n represents the number of columns. Row vectors are of the form <em>1 x n</em> whereas column vectors are of the form <em>m x 1</em>.</p><p>As a vector is a collection of numbers is it often described as a mathematical construct that contains information about both <strong>magnitude and direction</strong>.</p><h3>Vector Operations</h3><p>Let us now see how vectors can interact which each other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_ue56kXvSwNbLYuQogV90g.png" /></figure><p>The later line is read as “<em>where u &amp; v belong to the space R³</em>” which means that u &amp; v belong to the 3-dimensional vector space.</p><ol><li><strong>Addition</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gN-QC2BjzS8hkydjMu1ejg.png" /></figure><p>2. <strong>Subtraction</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u4Wx0Q910-nHhLFMccKtFA.png" /></figure><p>3. <strong>Scalar Multiplication</strong></p><p>A <strong>scalar</strong> is a vector in one-dimension, which means it is a vector with just one component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*laMc1AS8TIdYBt_1xXC6Lw.png" /></figure><p>4. <strong>Associativity</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*viQuUp74p0wUdmm1CUWOPQ.png" /></figure><p>5. <strong>Transpose</strong></p><p>Transpose is an operation that flips a vector by 90⁰.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ytm1LKExptDQ9xinTr_Zsw.png" /></figure><p>While we are at the operations of vectors, it will be good to mention two special vectors: Zero Vector and One Vector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FVaIGO7dtCAb5D67cXiG0w.png" /></figure><h3>Dot Product</h3><p>The dot product is a vector multiplication operation performed on two vectors of the same dimensions resulting in a scalar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nXm4cTS8C2ZKzY1kpgG8Lg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UIfoUpyTrQ37-w2jrpnvXw.png" /></figure><h3>Vector Norm</h3><p>A vector norm is a vector operation that provides us with an estimation of the magnitude of a vector or “how big is the vector”.</p><p>Let us look at <strong>u</strong>.<strong>u</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yTfx6Acwv0-VbZsRsFj9AQ.png" /><figcaption>2 — Norm</figcaption></figure><p>The above expression looks awfully like the euclidean distance, or simply, the distance of a point in n-dimensional vector space from the origin. This is used to define the <strong>2-norm</strong> of a vector u.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v6zvYLSzg76F3DK2G54cIg.png" /></figure><p>A unit vector is a vector with 2-norm equal to 1. If a vector v is not a unit vector than a unit vector u in the same direction as v can be calculated using —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*4wi6lwZrKx6dzf5jiI_UuA.png" /></figure><p>In general, the p-norm of a vector is defined as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mDMNGqqMsgS8Slt0NQjU8w.png" /></figure><p>Typically, 1-norm is just the summation of all the components of a vector and is often called <em>Taxicab Distance or Manhattan Distance. </em>On the other hand, infinity-norm is a totally different concept.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7XK12X8HA_N5NMqMJEGBmA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uuNMcKcoHcEsZ3YIEVVkoA.png" /></figure><h3>Geometric Interpretation of Inner Product</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IvVhnDevl8qh4iMeSd4Dew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kvnsthiAdgldEy60IMRM-w.png" /></figure><p>Let u and v be two vectors in the same vector space, and neither of them is a zero vector. If <strong>u.v</strong> = 0, then the two vectors are called <strong>orthogonal</strong>. In fact, <strong>u</strong>.<strong>v</strong> = 0 if and only if <strong>u</strong> and <strong>v </strong>are orthogonal.</p><h3>Cauchy-Schwartz Inequality</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eABXMwCxOgUmjL9LedZq9w.png" /></figure><h3>Triangle Inequality</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GCEG6LIyAwknKJvsd-SP0A.png" /></figure><p>The equation in red is called <strong>The Triangle Inequality</strong> and it holds true for all p-norms.</p><h3>Linear Combination of Vectors</h3><p>Linear Combination is simply the weighted sum of vectors. Let <strong>u</strong> and <strong>v</strong> be two vectors in the same dimension, and a and b be scalars. w = a.<strong>u</strong> + b.<strong>v </strong>is a linear combination of <strong>u</strong> and <strong>v.</strong></p><p>Let us look at some identities of Linear Combinations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3AvBOV7rYS9ZH25HzG1lTg.png" /></figure><p>To round up, vectors are the very building blocks of Algebra and the understanding of operations on vectors has the potential to rescue Data Scientists in tricky situations. In the next article, I’ll talk about Matrices and their operations.</p><blockquote>Please forgive my crude penmanship.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c89b9674751b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Determinant of a Matrix]]></title>
            <link>https://medium.com/@utkarsh.mathur/determinant-of-a-matrix-numerical-linear-algebra-part-2-24c0036bded8?source=rss-9a9f0766e433------2</link>
            <guid isPermaLink="false">https://medium.com/p/24c0036bded8</guid>
            <category><![CDATA[mathematics-education]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[mathematics]]></category>
            <dc:creator><![CDATA[Utkarsh Mathur]]></dc:creator>
            <pubDate>Wed, 19 Jan 2022 11:07:27 GMT</pubDate>
            <atom:updated>2023-03-01T00:00:08.297Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This article was originally part of my Numerical Linear Algebra series but since I deterred from the course of pursuing Numerical Linear Algebra and instead study Linear Algebra from a different source, I am publishing this as a standalone article. You can also read another article from this series mentioned below.</em></p><p><a href="https://medium.com/@utkarsh.mathur/matrix-matrix-operations-numerical-linear-algebra-part-1-c736a9360e81">Matrix &amp; Matrix Operations</a></p><p>Every square matrix of the order n x n can be associated with an expression or a number which is known as the determinant of the matrix denoted by det(<strong>A</strong>) or |<strong>A</strong>|. A matrix that is not a square matrix can not posses a determinant.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7AOY_9kkCL1WIBBDVEsrEQ.jpeg" /><figcaption>Demonstration of Determinant of a matrix <strong>A. </strong>(pardon my penmanship)</figcaption></figure><h3><strong>Properties of the Determinant</strong></h3><ol><li>Determinant of any matrix <strong>A</strong> and its transpose <strong>Aᵀ</strong> are same, i.e., |<strong>A</strong>| = |<strong>Aᵀ</strong>|.</li><li>If a matrix <strong>A</strong> has a row (or column) of zeros then |<strong>A</strong>| = 0.</li><li>If a matrix <strong>A</strong> has two identical rows (or columns) then |<strong>A</strong>| = 0.</li><li>If a matrix <strong>A</strong> is triangular, i.e. it is either upper triangular matrix or lower triangular matrix, then the determinant of the matrix <strong>A</strong> will be a product of its diagonal elements.</li><li>If two rows (or columns) of a matrix <strong>A</strong> are interchanged the determinant of the new matrix <strong>B</strong> will be of opposite sign of determinant of matrix <strong>A</strong>, i.e., |<strong>B</strong>| = -|<strong>A</strong>|.</li><li>If a row (or column) of a matrix <strong>A</strong> is multiplied with a scalar k, then the determinant of the new matrix <strong>B</strong> will be k times det <strong>A</strong>, i.e., |<strong>B</strong>| = k |<strong>A</strong>|.</li><li>|<strong>AB</strong>| = |<strong>A</strong>||<strong>B</strong>| and |<strong>A</strong>ⁿ| = |<strong>A</strong>|ⁿ</li><li>For a square matrix <strong>A</strong>, if |<strong>A</strong>| ≠ 0, the inverse of <strong>A</strong> exists and |<strong>A⁻¹</strong>| = 1 / |<strong>A</strong>|.</li><li>Adding a scalar multiple of one row (or column) to another row (or column) does not change the value of the determinant.</li></ol><h3>Minor and Cofactors</h3><p>Let <strong>A</strong> be a square matrix of order n and <strong>Mᵢⱼ </strong>is the matrix obtained by deleting iᵗʰ row and jᵗʰ column from matrix A then the determinant |<strong>Mᵢⱼ</strong>| is called the <strong><em>minor</em></strong> of the aᵢⱼ element of <strong>A</strong>. This is how a minor is defined. Furthermore, <strong><em>cofactor</em></strong> <strong>Cᵢⱼ </strong>of aᵢⱼ element of <strong>A</strong> is the signed minor <strong>Mᵢⱼ </strong>defined as <strong>Cᵢⱼ </strong>= (-1)ᶦ⁺ʲ |<strong>Mᵢⱼ</strong>|.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9aB0NshrYZMwEedkcAUejw.jpeg" /><figcaption>Example of <strong>Minor and Cofactor. </strong>(pardon my penmanship)</figcaption></figure><p>Determinant of matrix <strong>A</strong> can be written in the form of cofactors too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SleBRApBFzVbVU5zeS7Kcg.jpeg" /><figcaption>Determinant of <strong>A</strong> in the form of cofactors. (pardon my penmanship)</figcaption></figure><h3>Adjoint of a Matrix</h3><p>As discussed in the previous article, adjoint of a matrix <strong>A</strong> is defined as the transpose of the cofactor matrix <strong>C</strong>, where <strong>C</strong> is the matrix formed by the cofactors of the elements of <strong>A</strong>, i.e., adj(<strong>A</strong>) = [<strong>Cᵢⱼ</strong>]ᵀ.</p><p>It is a well known fact that <strong>A</strong>(adj <strong>A</strong>) = (adj <strong>A</strong>)<strong>A</strong> = |<strong>A</strong>|<strong>I</strong>. Therefore, for a non-singular matrix, i.e. |<strong>A</strong>|≠0, inverse of <strong>A</strong> is defined as <strong>A⁻¹</strong> = |<strong>A</strong>|⁻¹ adj(<strong>A</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BazyAc76KmctUPWwQW8LZw.jpeg" /><figcaption>Illustration of inverse of a matrix. (pardon my penmanship)</figcaption></figure><p>Again, I would like to mention the fact that <strong><em>inverse of a matrix is the property of square matrices only</em></strong>.</p><h3>Crammer’s Rule</h3><p>Let us now look into one of the most famous application of determinant of matrix -<strong><em>Crammer’s Rule</em></strong>.</p><p>A system of n linear equations in n unknowns is called a <strong><em>Crammer system</em></strong> if and only if the matrix <strong>A</strong> formed by the coefficients of the unknowns in the system of linear equations is non-singular, i.e., |<strong>A</strong>|≠0. A special method to solve such a system of linear equations is<strong><em> Crammer’s rule</em></strong>.</p><p>Consider a system of linear equation, a₁₁<em>x</em> + a₁₂<em>y</em> + a₁₃<em>z</em> = b₁, a₂₁<em>x</em> + a₂₂<em>y</em> + a₂₃<em>z</em> = b₂, and a₃₁<em>x</em> + a₃₂<em>y </em>+ a₃₃<em>z</em> = b₃. Then this system of linear equations can be written as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GwjVfI68oohLt0sNBxXe-Q.jpeg" /><figcaption>System of Linear Equations (pardon my penmanship)</figcaption></figure><p>here <strong>A</strong> = (aᵢⱼ)₃ₓ₃ , <strong>X</strong> = [x y z]ᵀ, and <strong>B</strong> = [b₁ b₂ b₃]ᵀ. Thus, <strong>AX</strong> = <strong>B</strong>. So now, if |<strong>A</strong>|≠0, the above system is Crammer’s system and it can be solved using the Crammer’s rule which is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hDfPHTDlCaKOPK7l2TTdSg.jpeg" /><figcaption>Crammer’s Rule (pardon my penmanship)</figcaption></figure><p><em>Matrix and its operations lay the very foundations of Linear Algebra and are very crucial in Engineering and Mathematics.</em></p><p><em>Thanks!!! Share your feedback in the comments.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24c0036bded8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Matrix & Matrix Operations]]></title>
            <link>https://medium.com/@utkarsh.mathur/matrix-matrix-operations-numerical-linear-algebra-part-1-c736a9360e81?source=rss-9a9f0766e433------2</link>
            <guid isPermaLink="false">https://medium.com/p/c736a9360e81</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[mathematics-education]]></category>
            <dc:creator><![CDATA[Utkarsh Mathur]]></dc:creator>
            <pubDate>Tue, 18 Jan 2022 19:49:49 GMT</pubDate>
            <atom:updated>2023-02-28T23:56:22.296Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This article was originally part of my Numerical Linear Algebra series but since I deterred from the course of pursuing Numerical Linear Algebra and instead study Linear Algebra from a different source, I am publishing this as a standalone article. Below is the reference to the only remaining article of the series.</em></p><p><a href="https://medium.com/@utkarsh.mathur/numerical-linear-algebra-part-0-introduction-f695272a3e65">Numerical Linear Algebra | Part 0 | Introduction</a></p><p>Let’s start by defining a matrix. <strong>Matrix</strong> is a rectangular array of numbers arranged in the form of rows and columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*sfLD5AzP-vq6ryq3CZh2GA.png" /><figcaption>Representation of a Matrix</figcaption></figure><p>The number of rows and columns of a matrix is called <strong><em>dimensions of a matrix</em></strong>. For the matrix <strong>A</strong> in the image above the dimensions are m x n. The <strong><em>transpose of a matrix</em></strong> is obtained by writing the rows of the matrix in order as the columns of the matrix. The transpose of matrix <strong>A</strong> is denoted as <strong>Aᵀ</strong>. The dimensions of <strong>Aᵀ </strong>would be n x m.</p><h3>Types of Matrices</h3><p>Let us define some of the types of matrices commonly found in literature.</p><ol><li><strong><em>Row Matrix</em></strong> :- A row matrix is formed by a single row. The dimensions of a row matrix are 1 x n.</li><li><strong><em>Square Matrix</em></strong> :- A matrix of the order m x n is said to be square if m =n. The dimensions of a square matrix and its transpose are same.</li><li><strong><em>Diagonal Matrix</em></strong> :- A square matrix of the order n x n is said to be diagonal if aᵢⱼ = 0 for all i ≠ j while the diagonal entries may be zero or non-zero.</li><li><strong><em>Scalar Matrix</em></strong> :- A diagonal matrix is said to be scalar matrix if all the diagonal elements are equal.</li><li><strong><em>Identity Matrix</em></strong> :- A scalar matrix is said to be identity matrix if all the diagonal elements are equal to 1.</li><li><strong><em>Upper Triangular Matrix</em></strong> :- A square matrix of the order n x n is said to be upper triangular matrix if aᵢⱼ = 0 for all i &gt; j.</li><li><strong><em>Lower Triangular Matrix</em></strong> :- A square matrix of the order n x n is said to be lower triangular matrix if aᵢⱼ = 0 for all i &lt;j.</li></ol><p><strong><em>Symmetric Matrix</em></strong> :- Any square matrix is said to be symmetric if <strong>A</strong> = <strong>Aᵀ.</strong></p><ol><li><strong><em>Skew Symmetric Matrix</em></strong> :- Any square matrix is said to be skew symmetric matrix if <strong>A</strong> =-<strong>Aᵀ</strong>. Interestingly, all the diagonal elements of a skew symmetric matrix are 0.</li><li><strong><em>Hermitian Matrix</em></strong> :- A square matrix of the order n x n is said to be hermitian matrix if <em>the transpose of the conjugate of the matrix is equal to the original matrix</em>. A real hermitian matrix is a symmetric matrix. All the diagonal elements of a hermitian matrix are real.</li><li><strong><em>Skew Hermitian Matrix</em></strong> :- A square matrix of the order n x n is said to be skew hermitian matrix if <em>the transpose of the conjugate of the matrix is equal to the negative of the original matrix. </em>A real skew hermitian matrix is a skew symmetric matrix. All the diagonal elements of a skew-hermitian matrix are either 0 or purely imaginary.</li></ol><h3>Addition of Matrices</h3><p>Let us consider two matrices <strong>A</strong> = ( aᵢⱼ )ₘ ₓ ₙ and <strong>B</strong>= ( bᵢⱼ )ₘ ₓ ₙ. The sum of A and B is defined as <strong>A</strong> + <strong>B</strong> =( aᵢⱼ + bᵢⱼ)ₘ ₓ ₙ.</p><p>Addition of Matrices have various properties:</p><ol><li><strong><em>Closure</em></strong> :- If <strong>A</strong> &amp; <strong>B</strong> are of the dimensions m x n then their sum will also be of the dimensions m x n.</li><li><strong><em>Associative</em></strong> :- <strong>A</strong> + ( <strong>B</strong> + <strong>C</strong> ) = ( <strong>A</strong> + <strong>B )</strong> + <strong>C</strong></li><li><strong><em>Additive</em></strong> :- <strong>A</strong> + <strong>O</strong> = <strong>A </strong>, where <strong>O </strong>is zero matrix.</li><li><strong>Additive Inverse</strong> :- <strong>A</strong> + (<strong>-A</strong>) = <strong>O</strong>.</li><li><strong>Commutative</strong> :- <strong>A</strong> + <strong>B</strong> = <strong>B</strong> + <strong>A</strong>.</li></ol><h3>Multiplication of Matrices</h3><p>For the multiplication of matrices <strong>A</strong> &amp; <strong>B</strong> to be possible, the number of columns of <strong>A</strong> should be equal to the number of rows of <strong>B</strong>. The image below illustrates multiplication of two matrices (pardon my penmanship).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZnwbAZ2gIwv2RNdzE8zbEA.jpeg" /><figcaption>Illustration of Multiplication of Matrices</figcaption></figure><p>For the sake of demonstration of various multiplication properties of matrices let us consider matrices <strong>A</strong> = ( aᵢⱼ )ₙ ₓ ₙ , <strong>B</strong> = ( bᵢⱼ )ₙ ₓ ₙ , and <strong>C</strong> = ( cᵢⱼ )ₙ ₓ ₙ.</p><ol><li><strong>Associative</strong> :- <strong>A</strong> ( <strong>BC</strong> ) = ( <strong>AB</strong> )<strong>C</strong></li><li><strong>Left Distributive</strong> :- <strong>A</strong> (<strong>B</strong>+<strong>C</strong>) = <strong>AB</strong> + <strong>AC</strong></li><li><strong>Right Distributive</strong> :- (<strong>A</strong>+<strong>B</strong>) <strong>C</strong> = <strong>AC</strong> + <strong>BC</strong></li><li><strong>Scalar Multiplication</strong> :- r(<strong>AB</strong>) = (r<strong>A</strong>)<strong>B</strong> = <strong>A</strong>(r<strong>B</strong>) where r is a scalar</li></ol><h3>Properties of Transpose</h3><ol><li><strong>(Aᵀ)ᵀ </strong>=<strong> A</strong></li><li>(<strong>A</strong> + <strong>B</strong>)<strong>ᵀ </strong>=<strong> Aᵀ </strong>+<strong> Bᵀ</strong></li><li>(<strong>AB</strong>)<strong>ᵀ </strong>=<strong> BᵀAᵀ</strong></li><li>(r<strong>A</strong>)<strong>ᵀ </strong>= r<strong>Aᵀ</strong></li></ol><h3>Adjoint Matrix</h3><p>Adjoint of a square matrix is the transpose of the cofactor matrix <strong>C</strong>, where <strong>C</strong> is the matrix formed by the cofactors of the elements of <strong>A</strong>. Cofactor of aᵢⱼ, in a matrix <strong>A</strong>, is the determinant of the matrix obtained by removing row i and column j from matrix <strong>A</strong>. A few properties of adjoint of a matrix are:</p><ol><li>adj(<strong>I</strong>) = <strong>I</strong></li><li>adj(<strong>AB</strong>) = adj<strong>B</strong> adj<strong>A</strong></li><li>adj(c<strong>A</strong>) = cⁿ⁻¹adj(<strong>A</strong>)</li></ol><h3>Inverse of Matrix</h3><p>For a square matrix <strong>A</strong>, if there exist a matrix <strong>B</strong> such that <strong>AB</strong> = <strong>BA</strong> = <strong>I</strong>, then <strong>B</strong> is called <strong><em>inverse of</em></strong> <strong>A</strong> and is denoted by <strong>A⁻¹</strong>.</p><p>Some of the properties of inverse of matrix are stated below:</p><ol><li>(<strong>AB</strong>)⁻¹ = <strong>B</strong>⁻¹<strong>A</strong>⁻¹</li><li>(<strong>A</strong>⁻¹)⁻¹ = <strong>A</strong></li><li>(k<strong>A</strong>)⁻¹ = k⁻¹ <strong>A</strong>⁻¹</li><li>Inverse of a matrix is unique.</li></ol><p>Now that we are familiar with the concepts of addition, multiplication, adjoint, and inverse of matrix let us acquaint ourselves with a few more famous matrices.</p><ol><li><strong><em>Orthogonal Matrix</em></strong> :- A square matrix of the order n x n is said to be orthogonal if <strong>AAᵀ</strong> =<strong> I.</strong></li><li><strong><em>Unitary Matrix</em></strong> :- A square matrix of order n x n is said to be unitary if the multiplication of <strong>A</strong> and the transpose of its conjugate is <strong>I</strong>.</li><li><strong><em>Idempotent Matrix</em></strong> :- A square matrix is called idempotent if <strong>A</strong>² = <strong>A</strong>. If <strong>A</strong> is both idempotent and invertible then <strong>A</strong> = <strong>I</strong>.</li><li><strong><em>Involutory Matrix</em></strong> :- A square matrix is called involutory if <strong>A</strong>² = <strong>I</strong>.</li><li><strong><em>Nilpotent Matrix</em></strong> :- Any square matrix of order n x n is said to be a nilpotent matrix of index k if <strong>Aᵏ</strong> = <strong>O</strong> but <strong>Aᵏ⁻¹</strong> ≠ <strong>O.</strong></li></ol><p>This was all for this article. In the next part, I’ll talk about <strong>the geometry of linear equations</strong>. If you want to contact me just drop a comment. Till then learn, practice, and evolve 🖖🏼.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c736a9360e81" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Numerical Linear Algebra | Part 0 | Introduction]]></title>
            <link>https://medium.com/@utkarsh.mathur/numerical-linear-algebra-part-0-introduction-f695272a3e65?source=rss-9a9f0766e433------2</link>
            <guid isPermaLink="false">https://medium.com/p/f695272a3e65</guid>
            <category><![CDATA[mathematics-education]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Utkarsh Mathur]]></dc:creator>
            <pubDate>Tue, 18 Jan 2022 13:14:01 GMT</pubDate>
            <atom:updated>2023-03-01T00:03:17.022Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction | Linear Algebra | Part 0</h3><p><em>This series has been terminated and its articles are published as standalone articles mentioned below. You can follow my new series named “Numerical Mathematics for Data Scientists”.</em></p><p><em>Sorry for the inconvenience.</em></p><ul><li><a href="https://medium.com/@utkarsh.mathur/matrix-matrix-operations-numerical-linear-algebra-part-1-c736a9360e81">Matrix &amp; Matrix Operations</a></li><li><a href="https://medium.com/@utkarsh.mathur/determinant-of-a-matrix-numerical-linear-algebra-part-2-24c0036bded8">Determinant of a Matrix</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cQ389w9W6o9aaAM5eXVodw.png" /></figure><p>I am not an expert mathematician but I do know a thing or two about mathematics because of my profession — Data Science. I’ve been practicing Data Science for over 2 years and I’ve often felt that it is a beautiful intersection of Computer Science and Mathematics. Like most people, I started my Data Science practice by learning from MOOCs and so I never learned the mathematical principles behind most of the algorithms. As I am an engineering student, I’ve basic understanding of mathematics and now I am meticulously learning all the advanced mathematical concepts required to have a deeper understanding of Data Science.</p><p>I’ve started by understanding Linear Algebra and this blog series is a record of the experience. The main aim of writing this blog is to keep a short and organized record of all the crucial concepts.</p><p>I’ll be writing easy to simple blogs that can help anyone understand these concepts and be helpful in the swift revision of topics.</p><p>In the next blog I’ll briefly introduce Matrices, Matrix Operations, and Types of Matrices. If you want to contact me just drop a comment. Till then learn, practice, and evolve 🖖🏼.</p><p><a href="https://medium.com/@utkarsh.mathur/matrix-matrix-operations-numerical-linear-algebra-part-1-c736a9360e81">Matrix &amp; Matrix Operations</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f695272a3e65" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>