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.

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.

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β, π

β’ β’ β’

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

This Thread may be Removed Anytime!

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

More from @swapnakpanda

Jul 1
π£οΈ Beginner's Roadmap for Full Stack Web Development

β€ JavaScript
β§ MERN
β§ MEVN
β§ MEAN
β€ PHP
β§ LAMP
β€ 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.

Front-End β
β
Back-End β
β
Database β
β
Integrations β
β
Version Control β
β
Operating System β

Finally, how to approach? β
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
Jun 30
25 Web APIs for Advanced Web Development

The APIs are,

β Fetch
β Canvas
β WebGL
β Web Audio
β WebRTC
β Geolocation
β Vibration
β Web Storage
β IndexedDB
ββ Barcode Detection
ββ Clipboard
ββ Full Screen
ββ Drag n Drop
ββ Selection
ββ Image Capture
ββ Floating Video
ββ Payment Request
20. Bluetooth
ββ Battery Status
ββ Network Information
ββ History
ββ Console
ββ Performance

Let's explore.
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
β Rest Parameters
β Modules
ββ Symbol
ββ Typed Arrays
ββ Generator, Iterator
ββ for...of
ββ Computed Property Names
Jun 29
75+ Interview Questions

β€ C++
β€ Java
β€ C#
β€ Python
β€ JavaScript

on OOPs & Design Patterns.

Level: Beginner to Medium
Topic:

β 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?
Or,