University Teacher Vlogs

University Teacher Vlogs

Share

I am a faculty member at NUST, Islamabad, Pakistan. I make educational and travel vlogs.

15/02/2026

Islamabad

14/02/2026

Sunset in Islamabad

12/02/2026

NUST Green Campus Initiative

Photos from University Teacher Vlogs's post 11/02/2026

British Council Dinner for Charles-Wallace Fellows

09/02/2026

Dinner Invitation from British Council Pakistan to Charles-Wallace Fellows

08/02/2026

Bheera Islamabad

07/02/2026

Lahore Basant 2026

05/02/2026

NUST Olympiad 2026 Fireworks

25/12/2025

Singular Value Decomposition, or SVD, is a fundamental concept in linear algebra, but its applications extend to many other fields like data science, machine learning, and image compression. At its core, SVD is a method of breaking down a complex matrix into three simpler, more manageable matrices.To put it simply, if you have a matrix (which you can think of as a table of numbers), SVD provides a way to express it as a product of three other matrices:1.U: An orthogonal matrix.2.Σ (Sigma): A diagonal matrix containing the singular values.3.V^T (V-transpose): Another orthogonal matrix.The "singular values" in the Sigma matrix are key. They are non-negative numbers, arranged from largest to smallest, that tell you the importance of different features or components within the original data. The larger the singular value, the more significant the corresponding information is.What is it used for?SVD is incredibly versatile, but some of its most common applications include:•Dimensionality Reduction: In datasets with many variables (like customer data with hundreds of attributes), SVD can help identify the most important underlying patterns, allowing you to reduce the number of variables without losing significant information. This is often used in a technique called Principal Component Analysis (PCA).•Image Compression: An image can be represented as a matrix of pixel values. SVD can be used to approximate this matrix with a less complex one by keeping only the largest singular values. This results in a compressed image that takes up less storage space.•Recommender Systems: SVD can help predict user ratings for items (like movies or products) by analyzing a matrix of user-item ratings.•Noise Reduction: By identifying and removing the components associated with the smallest singular values, SVD can help to filter out noise from data.

23/12/2025

What is Caesar Shift?

The Caesar Shift, more commonly known as the Caesar Cipher, is one of the simplest and most widely known forms of encryption. It is a type of substitution cipher where each letter in the plaintext (the original message) is "shifted" a certain number of places down or up the alphabet.The method is named after Julius Caesar, who, according to the historian Suetonius, used it with a shift of three to protect his military communications.

The Core Idea: A Simple Alphabetical Shift

The key to a Caesar cipher is a single number, the shift value. This number tells you how many positions to move each letter.Let's use the most famous example: a shift of 3.

1.Write out the alphabet:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z2.Create a "shifted" alphabet by moving each letter 3 places to the right. When you get to the end of the alphabet, you "wrap around" to the beginning.
•A becomes D
•B becomes E
•C becomes F
•...
•W becomes Z
•X becomes A (wraps around)
•Y becomes B (wraps around)
•Z becomes C (wraps around)
So, the mapping looks like this:

Plain: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Cipher: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C

How to Encrypt and DecryptEncryption:

To encrypt a message, you replace each letter of your original message (plaintext) with its corresponding letter from the shifted alphabet (ciphertext).Let's encrypt the message "HELLO WORLD" with a shift of 3.
•H shifts 3 places to become K
•E shifts 3 places to become H
•L shifts 3 places to become O
•L shifts 3 places to become O
•O shifts 3 places to become R
•W shifts 3 places to become Z
•O shifts 3 places to become R
•R shifts 3 places to become U
•L shifts 3 places to become O
•D shifts 3 places to become G
So, the encrypted message (ciphertext) is: "KHOOR ZRUOG"

Decryption: To decrypt a message, you do the exact opposite.

You take each letter of the ciphertext and shift it back by the same number of places. In our example, you would shift each letter 3 places to the left.Let's decrypt "KHOOR ZRUOG" with a shift of 3
•K shifts back 3 places to become H
•H shifts back 3 places to become E
•...and so on.
This will correctly recover the original message: "HELLO WORLD".The Mathematics Behind It (Modular Arithmetic)The "wrapping around" behavior is handled mathematically using modular arithmetic.

1.First, assign a number to each letter of the alphabet (A=0, B=1, C=2, ..., Z=25).

2.Let p be the numerical value of a plaintext letter.

3.Let k be the shift value (the key).

4.The numerical value of the encrypted letter, c, is given by the formula:c = (p + k) mod 26
The "mod 26" part is what handles the wrap-around. It gives you the remainder after dividing by 26.

Example: Encrypting the letter 'Y' (p=24) with a shift of 3 (k=3).
•c = (24 + 3) mod 26•c = 27 mod 26
•c = 1The letter corresponding to 1 is 'B'. So, 'Y' becomes 'B', which is correct.

Decryption Formula:p = (c - k) mod 26

Why the Caesar Cipher is Not Secure

The Caesar cipher is extremely easy to break and offers no real security in the modern world. Here's why:

1.Tiny Key Space: There are only 25 possible shifts (a shift of 26 brings you back to the original alphabet). An attacker can simply try all 25 possibilities by hand or with a computer in a fraction of a second. This is called a brute-force attack.

2.Frequency Analysis: In any given language, some letters appear more frequently than others (for example, 'E' is the most common letter in English). An attacker can count the frequency of each letter in the ciphertext. If 'H' is the most frequent letter in the ciphertext, it's highly likely that it corresponds to 'E'. This would reveal a shift of 3 (from E to H), and the entire message would be cracked instantly.Despite its weakness, the Caesar cipher is a fantastic first step in learning about cryptography because it introduces the core concepts of plaintext, ciphertext, keys, and substitution in a very simple and understandable way.

23/12/2025

Difference between Linear and Affine Transformation:

An affine transformation is, intuitively, any transformation that preserves the "geometry" of a space—lines remain lines, parallel lines remain parallel, and ratios of distances along a line are preserved. However, unlike a purely linear transformation, it does not have to keep the origin fixed.Let's break this down.

1. The Linear Transformation: The FoundationFirst, let's quickly recap what a linear transformation is. A transformation L is linear if it satisfies two strict rules:

1.Additivity: L(v + w) = L(v) + L(w) (The transform of a sum is the sum of the transforms).

2.Homogeneity: L(c*v) = c*L(v) (You can factor out scalar constants).A key consequence of these rules is that a linear transformation must always map the origin to the origin: L(0) = 0.In terms of geometry, a linear transformation can only do three things, all centered at the origin:

•Rotation (around the origin)
•Scaling (from the origin)
•Shearing (or skewing, anchored at the origin)A linear transformation is represented by a simple matrix multiplication:
y = Ax.

2. The Affine Transformation: Linear + Translation

An affine transformation is a generalization of a linear transformation. It is composed of two steps:

1.A linear transformation (rotation, scaling, shear).

2.Followed by a translation (a shift or move).The mathematical formula for an affine transformation is:
y = Ax + b

•Ax is the linear part (the rotation, scaling, etc.).
•+ b is the translation part (the shift).
This + b term is what makes all the difference. Because of it, an affine transformation does not have to map the origin to the origin. If b is not the zero vector, then f(0) = A*0 + b = b. The origin moves.This is why an affine transformation is not technically a linear transformation (it violates the rules of additivity and homogeneity). It's a slightly broader category.

The Geometric Interpretation: What's the Difference?This is the most intuitive way to understand it.

FeatureVisual Analogy:
Imagine you have a shape drawn on a transparent rubber sheet.•A linear transformation is what you can do by stretching, rotating, or skewing the sheet, as long as you keep the center point (the origin) pinned down.

•An affine transformation is what you can do by stretching, rotating, or skewing the sheet and then sliding the entire sheet to a new position on the table.In the image, the transformation on the left is linear because the origin (the corner) stays put. The transformation on the right is affine because it involves the same scaling/shearing but is then moved (translated).Why is this distinction important?This concept is fundamental in many fields:

•Computer Graphics: Virtually all 2D and 3D manipulations of objects are affine transformations. When you move, resize, or rotate a character or object in a game, its vertices are being updated using an affine transformation matrix. The ability to translate (+ b) is obviously essential.

•Robotics: The position and orientation of a robot arm's end-effector relative to its base is described by a series of affine transformations.

•Physics: In classical mechanics, changing from one coordinate system to another moving at a constant velocity is an affine transformation (a Galilean transformation).In summary:An affine transformation is a linear transformation followed by a translation. Every linear transformation is affine (with a zero translation), but not every affine transformation is linear.

23/12/2025

History of Drag Coefficients:

The history of the drag coefficient is a fascinating story that mirrors the development of fluid dynamics itself. It's a journey from a simple, intuitive understanding of resistance to a sophisticated, dimensionless quantity that is essential for modern engineering, from designing cars to launching rockets.Here is a historical perspective on its development.

1. Antiquity to the Renaissance: The Qualitative Understanding
For most of human history, the concept of drag was purely qualitative and experiential.
•Aristotle (~350 BCE): The Greek philosopher Aristotle proposed that the speed of a falling object was inversely proportional to the resistance of the medium it traveled through. He believed that motion required a continuous force to overcome this resistance. While his physics was incorrect (he didn't account for inertia or acceleration), he was one of the first to formally acknowledge that a medium like air or water provides a resisting force.
•Leonardo da Vinci (~1500 CE): As a keen observer of nature, Leonardo da Vinci studied the flow of water and the flight of birds. His notebooks are filled with sketches of fluid eddies (which he called "turbolenza") and streamlines around objects. He correctly deduced that the resistance of a body moving through a fluid is proportional to its frontal area and the fluid's density. He wrote: "A body will offer more or less resistance in proportion as it is more or less blunt or sharp." This was a remarkable intuitive leap, but it remained qualitative and was not formulated into a mathematical law.2.

The 17th and 18th Centuries: The First Quantitative AttemptsThe Scientific Revolution brought a new emphasis on mathematical laws and experimentation. The problem of drag became a central question for the greatest minds of the era.

•Sir Isaac Newton (1687): In his monumental work, Principia Mathematica, Newton proposed the first quantitative formula for fluid resistance. He theorized that drag was caused by fluid particles hitting the front surface of an object and stopping, transferring their momentum to it. This led him to a formula that can be expressed in modern terms as:Drag ∝ ρ * A * v²
(where ρ is fluid density, A is frontal area, and v is velocity).This "Newtonian drag law" was a monumental step. It correctly identified the key variables and, most importantly, established the crucial velocity-squared relationship for high-speed flows. However, Newton's model was overly simplistic. It ignored the effects of fluid viscosity and the pressure changes around the back of the object (pressure drag), which are often the dominant sources of resistance. His theory worked reasonably well for very specific cases (like a flat plate perpendicular to the flow at high speeds) but failed for streamlined bodies.

•The "Ordnance Problem": In the 18th century, military engineers faced a very practical drag problem: predicting the trajectory of cannonballs. They knew that air resistance significantly shortened the range compared to the simple parabolic path predicted in a vacuum. Benjamin Robins (1742) and Charles Hutton conducted extensive experiments, firing cannonballs and measuring their flight paths. Their results confirmed the v² relationship at lower speeds but showed that as the cannonball approached the speed of sound, the resistance increased dramatically—the first experimental evidence of wave drag.

3. The 19th Century: The Great Paradox and the Rise of ExperimentationThe 19th century saw a split between theoretical and experimental fluid dynamics.

•The D'Alembert's Paradox (1752, but widely debated in the 19th century): Theoretical fluid dynamics, based on Euler's equations for "ideal" (inviscid, or frictionless) fluids, produced a shocking result. Jean le Rond d'Alembert proved that for a body moving through an ideal fluid, the net drag force is zero. This was in stark contrast to all real-world experience. The paradox highlighted that the theorists' model was missing a crucial ingredient: viscosity.

•George Stokes (1851): Stokes studied the opposite end of the spectrum: slow, creeping flows where viscosity dominates completely (e.g., a speck of dust falling in air or a pearl in honey). He derived a formula for drag on a sphere in this regime:Drag = 6π * μ * R * v
(where μ is fluid viscosity, R is the sphere's radius, and v is velocity).This showed that at very low speeds, drag is proportional to velocity (v), not velocity squared (v²). This created a clear division: Newton's law for high speeds, Stokes' law for low speeds.

•The First Wind Tunnels: The need to bridge the gap between theory and reality led to the invention of the wind tunnel. Francis Wenham (1871) in the UK and, more famously, the Wright Brothers (1901) in the US, used wind tunnels to systematically test different airfoil shapes. The Wrights realized that existing data on drag and lift was unreliable. Their own wind tunnel experiments allowed them to design a wing that could actually fly. They were measuring the effects of drag and lift, even without a formal coefficient.

4. The 20th Century: The Birth of the Modern Drag CoefficientThe final piece of the puzzle came from understanding that a single, universal parameter was needed to unify all these different effects.

•Ludwig Prandtl (1904) and the Boundary Layer: Prandtl resolved the D'Alembert's Paradox. He proposed the concept of the boundary layer—a thin layer of fluid near an object's surface where viscosity is crucial and cannot be ignored. Outside this layer, the fluid behaves as an "ideal" fluid. This insight unified theory and experiment. He showed that viscosity, even if small, causes two main types of drag:

1.Friction Drag: Due to the fluid "rubbing" against the surface within the boundary layer.

2.Pressure Drag (or Form Drag): Due to the boundary layer "separating" from the back of the object, creating a turbulent, low-pressure wake.

•The Buckingham π Theorem and Dimensional Analysis: Around the same time, the principles of dimensional analysis were being formalized. This powerful tool showed that complex physical problems could be simplified by grouping variables into dimensionless numbers. For the drag problem, it showed that all the variables (ρ, A, v) and the resulting drag force (D) could be combined into one dimensionless group.

•The Introduction of the Drag Coefficient (Cd): This led directly to the modern drag equation, which is essentially Newton's formula with a "correction factor" that accounts for everything Newton missed (shape, viscosity, compressibility, etc.).D = ½ * ρ * A * v² * C𝘥The drag coefficient (C𝘥) is this dimensionless correction factor. It is not a constant; it's a number that captures all the complex physics of an object's shape and the flow conditions. It is determined experimentally (usually in a wind tunnel) and allows engineers to:•Compare the aerodynamic efficiency of different shapes fairly.

•Scale results from a small model in a wind tunnel to a full-size vehicle.•Use a single, powerful equation for a vast range of problems.The introduction of the C𝘥 marked the maturation of fluid dynamics from a collection of disparate laws into a unified engineering science.

Want your school to be the top-listed School/college in Islamabad?

Click here to claim your Sponsored Listing.

Location

Category

Address


Islamabad