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

Apr 15
Learn Computer Science, FREE in 2025:

- Harvard
- Stanford
- MIT
- IIT
- Google
- Microsoft

10 Top Courses w/ Certificates* :
1. Introduction with CS50

- From Harvard

πŸŽ„ cs50.harvard.edu/x/Image
2. Computer Organization and Architecture

- From IIT Delhi

πŸŽ„ Course
onlinecourses.nptel.ac.in/noc24_cs83/pre…

πŸŽ„ YouTube Playlist
youtube.com/playlist?list=…Image
Read 11 tweets
Apr 13
Still paying for your cloud hosting?

What if there is a life-time free solution!!! Image
Introducing you to ClawCloud Run

A dev and deployment platform, integrates seamless with mainstream AI code editor, including Cursor, VSCode, Windsurf, JetBrains, etc.

⬘ Receive a $5 one-time credit on your sign up.

β¬— GitHub users registered for 180 days receive $5 free credit every month.

⬙ No credit card required. Now no more worries for high cloud fees.
Lightning-Fast Development

AI code + Cloud deployment = Projects go live in MINUTES!

ClawCloud Run lets you build an app in different ways.

1. Build from available 75+ templates like AI app, Games, Blogs, etc.
2. Host a database like PostgreSQL, MySQL, MongoDB, Redis, Kafka.
3. Store bulk data in Object Storage.
4. Develop an application using AI code editor.Image
Read 5 tweets
Apr 12
Stanford's FREE AI & ML Courses:

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

Course links are inside:
1. CS221 - Artificial Intelligence

πŸ–‡ youtube.com/playlist?list=…Image
2. CS229 - Machine Learning

- By Andrew Ng

πŸ–‡ youtube.com/playlist?list=…Image
Read 8 tweets
Apr 8
11 O'Reilly FREE Books

- Data Analysis
- Data Science
- Machine Learning
- Deep LearningImage
Image
Image
Image
1. Python for Data Analysis

πŸŽ„ wesmckinney.com/book/Image
2. Hands-on Machine Learning

πŸŽ„ rasa-ai.com/wp-content/upl…Image
Read 14 tweets
Apr 6
10000+ Pages FREE Programming Notes

❯ Python
❯ Java
❯ C/C++, DSA
❯ HTML, CSS, JavaScript
❯ SQL
❯ Linux, Git

40 other subjects - Beginner Friendly Notes

No signup required. Find links inside.Image
1. Python

- More than 200 Chapters
- 700+ Pages

goalkicker.com/PythonBook/Image
2. JavaScript

- More than 100 chapters
- 400+ Pages

goalkicker.com/JavaScriptBook/

❯ Node.js
goalkicker.com/NodeJSBook/

❯ React
goalkicker.com/ReactJSBook/

❯ React Native
goalkicker.com/ReactNativeBoo…

❯ TypeScript
goalkicker.com/TypeScriptBook…

❯ jQuery
goalkicker.com/jQueryBook/

❯ Angular
goalkicker.com/Angular2Book/Image
Read 10 tweets
Apr 5
I am a JavaScript Developer since 2005.

If I plan to learn it in 2025, I will do this:
➊ Fundamentals

Effort: 1 to 2 hours per day
Time: 2 weeks

βž€ JavaScript Engine
➁ JavaScript Runtime
βž‚ Execution Context
βžƒ Hoisting
βž„ Call Stack
βž… Event Loop
βž† Callback Queue
βž‹ Variables and, Datatypes

Effort: 1 to 2 hours per day
Time: 2 weeks

βž€ Datatypes
❯ Primitives
❯ Literals
❯ Numeric
❯ Boolean
❯ String

➁ Variable
❯ Naming
❯ Declaration (var, let, const)
❯ Assignment

✧ Special Topic
❯ Type Coercion
❯ undefined, null, NaNImage
Read 17 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!

:(