Search Knowledge

© 2026 LIBREUNI PROJECT

Linear Algebra / Overview

Linear Transformations and Matrices

Linear Transformations and Matrices

A linear transformation T:VWT: V \to W is a mapping between vector spaces that preserves the operations of addition and scalar multiplication.

Properties of Linear Maps

TT is linear if for all u,vV\mathbf{u}, \mathbf{v} \in V and cFc \in F:

  1. T(u+v)=T(u)+T(v)T(\mathbf{u} + \mathbf{v}) = T(\mathbf{u}) + T(\mathbf{v})
  2. T(cv)=cT(v)T(c\mathbf{v}) = cT(\mathbf{v})

Every linear transformation between finite-dimensional vector spaces can be represented as a matrix.

python
1import numpy as np
2 
3def apply_transformation(A, v):
4 return np.dot(A, v)
5 
6# Rotation Matrix by 90 degrees (pi/2)
7theta = np.pi / 2
8R = np.array([[np.cos(theta), -np.sin(theta)],
9 [np.sin(theta), np.cos(theta)]])
10 
11v = np.array([1, 0])
12v_rot = apply_transformation(R, v)
13 
14print(f"Original: {v}")
15print(f"Rotated 90 deg: {v_rot.round(2)}")

Composition and Matrix Multiplication

If T:UVT: U \to V and S:VWS: V \to W are linear maps, their composition ST:UWS \circ T: U \to W is also linear. The matrix representing STS \circ T is the product of the matrices representing SS and TT.

If A is a 3x2 matrix and B is a 2x5 matrix, what is the size of AB?

Change of Basis

The matrix representation of a linear map depends on the choice of bases for VV and WW. If [T]B[T]_B is the matrix in basis BB, and PP is the transition matrix from basis BB' to BB, then: [T]B=P1[T]BP[T]_{B'} = P^{-1} [T]_B P

python
1# T in standard basis
2T_std = np.array([[1, 2], [3, 4]])
3 
4# New basis B' = {[1,1], [1,0]}
5P = np.array([[1, 1], [1, 0]])
6P_inv = np.linalg.inv(P)
7 
8# T in new basis
9T_new = P_inv @ T_std @ P
10print(f"Matrix in new basis:\n{T_new.round(2)}")

What type of matrix transforms any vector to itself?