>_
EngineeringNotes

Inverse of Function

The concept of "reversing" an effect. From restoring original data scaling to decrypting secure messages.

1

Definition & The Identity

formal Definition

If we have a function f: X → Y mapping x to y, the inverse function f⁻¹: Y → X maps y back to x.

1. f(f⁻¹(y)) = y (for all y ∈ Y)
2. f⁻¹(f(x)) = x (for all x ∈ X)
XYff⁻¹

Identity Function

A function that returns its input unchanged: I(x) = x.

In Matrix form, it's the Identity Matrix (I).

I =
10
01
v =
2
3
⇒ Iv = v
2

Existence & Uniqueness

An inverse exists if and only if the function is Bijective.

1. Injective (One-to-One)

Distinct elements map to distinct images. No two inputs give the same output.

12
AB
2. Surjective (Onto)

Every element in the co-domain is covered. No "leftover" outputs.

"Entire Y is used"

Try it: Find the Inverse

f(x) = 2x + 3
y = 2x + 3
→ solve x
f⁻¹(y) = (y - 3) / 2
3

Applications in ML

1. Feature Scaling (Standardization)

We scale data so units don't affect the model (e.g., House Price vs Rooms). After training, we need to interpret predictions, so we use the Inverse Transformation.

# Standardize (Forward)
z = (x - μ) / σ
# Interpret (Inverse)
x = (z * σ) + μ
Raw Price (150k)
Model Input (1.2)
ML Training
Prediction (1.5)
Inverse
Real Price (180k)

2. Distribution Correction (Log Transform)

Financial data (like incomes) is often Right Skewed. We apply Log to make it Normal for the model.

Transformationy = log(x)
Inversex = eʸ

3. Cryptography (Conceptual)

Encryption: E(P) = C
Decryption: D(C) = P

Sensitive data is encrypted before storage. Decryption is the inverse function applied to retrieve original info.

4

Inverse of a Matrix

Determinant (|A|)

A single scalar value computed from a square matrix. It tells us the scaling factor of the transformation.

|A| = ad - bc
(for 2x2)

Geometrically, it represents the Area scaling.

The Inverse Formula

A⁻¹ = (1/|A|) * Adj(A)
Condition

If |A| = 0, the matrix is Singular (non-invertible). You cannot divide by zero!

Example Calculation

A =
47
26
det(A) = (4*6) - (7*2)
       = 24 - 14 = 10
A⁻¹ = (1/10)
6-7
-24
* Adjoint: Swap diagonal (4,6), flip signs of others (7,2).
5

Eigenvalues & Eigenvectors

Av = λv

Normally, when a matrix transforms a vector, it knocks it off its original line.

Eigenvectors (v) are special vectors that stay on their own line during transformation. They only get stretched or compressed.
The factor by which they stretch/compress is the Eigenvalue (λ).

Eigenvalue (λ):How much it stretches. (Scalar)
Eigenvector (v):The direction that survives. (Vector)
xAx (Rotated)vAv = λv* v stays on the same line, just longer

Step-by-Step Calculation

The Algorithm
  1. Find λ: Solve det(A - λI) = 0
    (Characteristic Equation)
  2. Find v: Solve (A - λI)v = 0
    (For each λ found)
Matrix A = [4 1; 2 3]
1. Find Eigenvalues
|A - λI| = (4-λ)(3-λ) - (1)(2)
= λ² - 7λ + 12 - 2
= λ² - 7λ + 10 = 0
(λ - 5)(λ - 2) = 0 ⇒ λ = 5, 2
2. Find Eigenvector (for λ=5)
(A - 5I)v = 0
[-1 1] [x] = [0]
[ 2 -2] [y] [0]
-x + y = 0 ⇒ y = x
Eigenvector v₁ = [1, 1]