Swapna Kumar Panda Profile picture
Nov 22, 2021 β€’ 18 tweets β€’ 6 min read
πŸ’™ Matrix implementation in JavaScript

Let's learn through this 🧡

0️⃣ Introduction

Matrix is a 2-dimensional Array arrangement of numbers.

[[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.

βœͺ 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”, πŸ‘‡


β€’ β€’ β€’

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!


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 1
πŸ›£οΈ Beginner's Roadmap for Full Stack Web Development

➀ JavaScript
➀ Python
✧ Django
➀ C#
✧ .NET
➀ Java
✧ Spring
✧ Jakarta EE

πŸ‘©β€πŸ’» Who is a Full Stack Web Developer?

⬘ Full Stack means a Developer can work in all stacks of an application.

β¬— A Full Stack Web Developer works to develop a Web Application.

⬙ His job role may depend upon the complexity of the application.
🎒 Step-by-Step Roadmap

Front-End ➊
Back-End βž‹
Database ➌
Integrations ➍
Version Control ➎
Operating System ➏

Finally, how to approach? ➐
Read 15 tweets
Jul 1
15 Quick Tips for JavaScript Beginners

➊ Primitive Types

⬘ A primitive is data that is not an object and has no methods or properties.

⬙ In JavaScript, there are 7 primitive types.

➀ string
➀ number
➀ bigint
➀ boolean
➀ undefined
➀ null
➀ symbol
βž‹ Primitive Wrapper Objects

⬘ Except for null and undefined, all primitive values have object equivalents that wrap around the primitive values.

⬙ These are the primitive wrapper objects

➀ String
➀ Number
➀ BigInt
➀ Boolean
➀ Symbol
Read 17 tweets
Jun 30
25 Web APIs for Advanced Web Development

The APIs are,

➊ Fetch
βž‹ Canvas
➌ WebGL
➍ Web Audio
➎ WebRTC
➏ Geolocation
➐ Notifications
βž‘ Vibration
βž’ Web Storage
βž“ IndexedDB
➊➊ Barcode Detection
βžŠβž‹ Clipboard
➊➌ Full Screen
➊➍ Drag n Drop
➊➎ Selection
➊➏ Image Capture
➊➐ Floating Video
βžŠβž‘ Payment Request
βžŠβž’ CSS Font Loading
20. Bluetooth
βž‹βžŠ Battery Status
βž‹βž‹ Network Information
βž‹βžŒ History
βž‹βž Console
βž‹βžŽ Performance

Let's explore.
Read 25 tweets
Jun 30
15 JavaScript Features that were added in ES2015

πŸ’­ Introduction

⬘ The major change ever happened to the JavaScript language was part of ES2015 specifications.

⬙ ES2015 is also popularly known as ES6.

We will list down 15 popular features that were added.
➊ let and, const
βž‹ Arrow Functions
➌ class
➍ Template String Literal
➎ Promises
➏ Default Function Parameters
➐ Destructuring
βž‘ Spread
βž’ Rest Parameters
βž“ Modules
➊➊ Symbol
βžŠβž‹ Typed Arrays
➊➌ Generator, Iterator
➊➍ for...of
➊➎ Computed Property Names
Read 20 tweets
Jun 29
75+ Interview Questions

➀ C++
➀ Java
➀ C#
➀ Python
➀ JavaScript

on OOPs & Design Patterns.

Level: Beginner to Medium

➊ OOPs Basics
βž‹ Class, Object, Interface
➌ Encapsulation, Abstraction, Polymorphism, Inheritance
➍ Constructor and Destructor
➎ Design Patterns
➊ OOPs Basics

βž€ What is a programming paradigm?
➁ Mention various programming paradigm types.
βž‚ What is structured programming?
βžƒ What are OOPs?
βž„ Why are OOPs needed?
βž… Advantages of OOPs
Read 20 tweets
Jun 29
I have clearly not mentioned this girl in the entire thread, and she herself is bringing her name in.

βž€ She shared it on Instagram.
➁ She replied here saying how I wrote only wrong about her.

My point-by-point rebuttal to her inside ↓ Image
Read 6 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!


0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy


3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!