πŸ’™ 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

23 Nov
πŸ’œ NPM Commands Cheat Sheet

Find reference to some of the most used NPM commands for Nodejs Development.

⇩ Image
There are more commands than listed here. If you want to know about all those commands, NPM has a very nice documentation.

Find reference to all commands here πŸ‘‡

https://docs[.]npmjs[.]com/cli/v6/commands
1️⃣ npm init Image
Read 8 tweets
21 Nov
πŸ’™ MongoDB in a Nutshell

Let's explore MongoDB, but in a nutshell.

πŸ‘‡ Image
0️⃣ Introduction

MongoDB is a leading NoSQL document-based database.

Let's explore some basic terminologies. ↓
1️⃣ MongoDB Server

βœͺ MongoDB Server is a server-side component which can host multiple databases.
Read 6 tweets
21 Nov
DSA - Starter Kit πŸš€

⇨ Who should learn?
⇨ Why to learn?
⇨ What should we start with?
⇨ How much is necessary?
⇨ Where to learn?

A comprehensive startup, oops "Starter Kit"

⇩
0️⃣ Let's Talk

βœͺ What is DSA?
β†’ DSA stands for "Data Structures and Algorithms"
β†’ DSA is a subject of study and, practice mostly in "Programming Domain"
β†’ Unlike popular belief, DSA is not one thing, rather 2 tightly coupled topics.
βœͺ What is a Data Structure?
A data structure is a way of organising (or, collecting) the data so that it can be used efficiently and effectively.

βœͺ What is an Algorithm?
An algorithm is a set of instructions for solving a problem or accomplishing a task.
Read 17 tweets
20 Nov
JavaScript Arrays[] Interview Questions πŸ’™

⇩
Before proceeding, do check the previous one of this series πŸ‘‡

Disclaimer:

β€’ The questions covered here are mostly conceptual
β€’ I do not claim only these type of questions are/should be asked during interviews
β€’ For interviews, you should have fundamentals strong. And you should be able to provide solutions to practical problems.
Read 19 tweets
18 Nov
SQL Interview Questions (S3)

⇩
This is the 3rd one in this series. Check the 2nd one πŸ‘‡

Disclaimer:

β€’ The questions covered here are mostly conceptual
β€’ I never claim only these type of questions are/should be asked during interviews
β€’ For interviews, you should have fundamentals strong. And you should be able to provide solutions to practical problems.
Read 16 tweets
14 Nov
πŸ“š Books you must read for

⇨ DSA
⇨ SQL
⇨ JavaScript

⇩
Books were and still are the most important medium for our knowledge growth.

Do you love to read books? How about for technical subjects? If no, I would suggest you should.

Here, I will list few of my favourite ones. If you want to add any, feel free.
1️⃣ DSA

1️⃣ Grokking Algorithms
Author: Aditya Bhargava

2️⃣ Introduction to Algorithms
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein

3️⃣ Introduction to Algorithms
Author: Udi Manber

4️⃣ The Algorithm Design Manual
Author: Steven S. Skiena
Read 11 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

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

Donate via Paypal

Thank you for your support!

Follow Us on Twitter!

:(