Swapna Kumar Panda Profile picture
Nov 22, 2021 18 tweets 6 min read Read on X
💙 Matrix implementation in JavaScript

Let's learn through this 🧵

0️⃣ Introduction

Matrix is a 2-dimensional Array arrangement of numbers.

Example:
[[a₁₁, a₁₂, a₁₃],
[a₂₁, a₂₂, a₂₃],
[a₃₁, a₃₂, a₃₃]]
✪ Element: Each item in the inner array is called an element of the matrix. Eg, a₁₁

✪ Row: Each item in the main array is called a row. Eg, [a₁₁, a₁₂, a₁₃]

✪ Column: A column is list of items at a specific index from each row in order. Eg, [a₁₁, a₂₁, a₃₁]
1️⃣ Dimension of a Matrix

Dimension of a Matrix is specified as the number of rows and number of columns in the matrix.
2️⃣ Square Matrix

A matrix is called as a "Square Matrix" only if its "number of rows" is equal to its "number of columns".
3️⃣ Diagonal Matrix

A "Diagonal Matrix" is a square matrix which has only Zeroes (0s) as its non-diagonal elements (row index = column index).

Diagonal elements can be both Non-Zero and Zero.
4️⃣ Upper Triangular Matrix

An "Upper Triangular Matrix" is a square matrix which has only Zeroes (0s) as elements "below" the diagonal elements.
5️⃣ Lower Triangular Matrix

An "Lower Triangular Matrix" is a square matrix which has only Zeroes (0s) as elements "above" the diagonal elements.
6️⃣ Identity/Unity Matrix

An "Identity Matrix" is a diagonal matrix with only 1s as its diagonal elements.
7️⃣ Zero Matrix

A "Zero Matrix" has only Zeroes (0s) as all its elements.
8️⃣ Transpose Matrix

A "Transpose Matrix" is formed by converting rows of a matrix into columns (and thus columns into rows).

Dimension of a transpose matrix is exactly opposite of the dimension of the original matrix.
9️⃣ Scalar Multiplication

By doing "Scalar Multiplication", each element of the matrix is multiplied by a scalar value.
1️⃣0️⃣ Matrix Addition

By "Matrix Addition", elements at a specific row and column from 2 matrices are added.
1️⃣1️⃣ Matrix Subtraction

By "Matrix Subtraction", elements at a specific row and column from one matrix is subtracted from the another.
1️⃣2️⃣ Matrix Multiplication

By "Matrix Multiplication", elements of a row from the first matrix is first multiplied with elements of a column from the second matrix and then summation is taken.
1️⃣3️⃣ Orthogonal Matrix

A matrix is known as "Orthogonal" when multiplied with its transpose results into an Identity Matrix.

In other words, if transpose of a matrix is equivalent to its inverse, the matrix is orthogonal.
OMISSIONS:

✪ Determinant of a Matrix
✪ Inverse of a Matrix

Because of their complex algorithms which won't fit into an infographic, I omitted these two.
Are you interested in JavaScript contents? I am sharing a lot of materials in Infographics.

All organised in a “Twitter Moment”, 👇

twitter.com/i/events/14358…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Swapna Kumar Panda

Swapna Kumar Panda Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @swapnakpanda

Jul 13
Best skills to build in 2025: AI & ML

Here's a complete roadmap & all free resources: Image
1. Python

Time: 1 month

Focus on Python programming and basic data structures.

⬙ Detailed Roadmap
x.com/swapnakpanda/s…

⬗ Free Book - Think Python (O'Reilly)
allendowney.github.io/ThinkPython/

⬗ Free Book - Introduction to Python Programming
assets.openstax.org/oscms-prodcms/…

⬘ Free Course - Harvard CS50
cs50.harvard.edu/python/

⬖ YouTube - Python for Everybody (freeCodeCamp)
youtube.com/watch?v=8Dvywo…Image
2. Mathematics

Time: 2nd & 3rd Month

➤ Key Topics
✩ Linear Algebra
✩ Single and Multivariable Calculus
✩ Probability & Statistics

⬙ Free Book
❯ Mathematics for Machine Learning
mml-book.github.io/book/mml-book.…

❯ Mathematics for Machine Learning (UC Berkeley)
gwthomas.github.io/docs/math4ml.p…

⬗ More Free Books
x.com/swapnakpanda/s…

⬘ Free Course - Khan Academy
❯ Linear Algebra
khanacademy.org/math/linear-al…

❯ Probability & Stats
khanacademy.org/math/statistic…

⬖ YouTube
youtube.com/@JonKrohnLearnsImage
Read 10 tweets
Jul 12
FREE Certifications fully accepted in the industry:

1. freecodecamp.org/learn/Image
2. University of Helsinki

❯ Python Programming
programming-25.mooc.fi

❯ Data Analysis with Python
courses.mooc.fi/org/uh-cs/cour…

❯ AI
elementsofai.com

❯ DevOps with Kubernetes
devopswithkubernetes.com

❯ Fullstack Web Development
fullstackopen.com

🖇️ All courses: mooc.fi/en/courses/Image
3. Kaggle Certifications

❯ Python
❯ SQL
❯ AI/ML, DL
❯ Data Science

🖇️ kaggle.com/learnImage
Read 10 tweets
Jul 11
Stanford's FREE Courses on AI & ML:

❯ CS221 - Artificial Intelligence
❯ CS229 - Machine Learning
❯ CS230 - Deep Learning
❯ CS234 - Reinforcement Learning
❯ CS229M - ML Theory
❯ CS224N - NLP with Deep Learning
❯ CS224U - NL Understanding

Course links inside:
1. CS221 - Artificial Intelligence

🖇 youtube.com/playlist?list=…Image
2. CS229 - Machine Learning

- By Andrew Ng

🖇 youtube.com/playlist?list=…Image
Read 9 tweets
Jul 4
Python is a MANDATORY skills in 2025.

This is how you can be an EXPERT in 1 year:
0. Preliminary Steps

Before deciding to start, ensure you do these

⬩Know your final goal
⬩Set a target for spending daily 1 hour minimum.
⬩Research about Python ecosystem (libraries, frameworks, code editors).

P.S: This is my personal roadmap. I could spend 1 to 2 hours daily for learning and practicing. And it took me ~1 year to finish. It may differ from person to person.
➊ Start with a bang: Simple Data Types

Schedule: Month-1
Effort: 1 to 2 hours daily + Normal practice

❯ Boolean
⬩bool
❯ Number
⬩int
⬩float
⬩complex
❯ String
⬩str
❯ Bytes
⬩bytes
⬩bytearray
⬩memoryview
Read 16 tweets
Jul 1
👩‍💻 Practice these 150+ Algorithms in

❍ C/C++
❍ Java
❍ Python
❍ JavaScript
Or, any language of your choice

Stay in top 5% of programmers.
➊ Arrays

➀ Creating an Array
➁ Iterate through Array
➂ Get an Element
➃ Search an Element
➄ Insert Element(s)
➅ Delete Element(s)
➆ Filter an Array
➇ Fetch a Sub-Array
➈ Merging Arrays
➉ Reverse Array
➀➀ Rotate Array
➋ Linked Lists

➀ Creating a Linked List
➁ Iterate through Linked List
➂ Get an Element
➃ Find an Element

➤ Insert Element(s)
➄ At Start
➅ At End
➆ At Anywhere

➤ Delete Element(s)
➇ From Start
➈ From End
➉ From Anywhere

➀➀ IsEmpty
➀➁ Merging Linked Lists
➀➂ Reverse Linked List
➀➃ Check for Cycles

Implement these algorithms for linked lists, double linked lists, circular linked lists, etc.
Read 19 tweets
Jun 27
FREE FREE FREE

11 Python Books, Absolutely FREEImage
Image
Image
Image
1. Machine Learning with Python

🎄 python-course.eu/books/bernd_kl…Image
Image
2. Data Structures & Algorithms using Python

This book of 222 pages implements all types of data structures and algorithms.

🎄 donsheehy.github.io/datastructures…Image
Image
Read 12 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(