Matrices

Definition

D

Definition

concept

A matrix is a rectangular array of numbers arranged in rows and columns enclosed between two brackets. Mathematically:

Am×n=[a11a12a1na21a22a2nam1am2amn]\boxed{A_{m \times n} = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix}}

Where:

  • AA: name of the matrix.
  • m×nm \times n: size of the matrix.
  • mm: rows.
  • nn: columns.
  • aija_{ij}: generic element of the matrix, meaning it is located in row ii and column jj.

Properties of Matrices

1. Properties of Addition

Am×n+Am×n=Am×n\boxed{A_{m \times n} + A_{m \times n} = A_{m \times n}}

  1. Commutative: A+B=B+AA + B = B + A
  2. Associative: A+(B+C)=(A+B)+CA + (B + C) = (A + B) + C

Properties of the Zero Matrix (θ\theta)

  1. A+θ=θ+A=AA + \theta = \theta + A = A
  2. θA=A\theta - A = -A
  3. A+(A)=AA=θA + (-A) = A - A = \theta
  4. Aθ=θA\theta = \theta ; θA=θ\theta A = \theta

Where:

  • θ=\theta = zero (null) matrix.
  • A=-A = additive inverse of AA.

2. Properties of Multiplication

Am×n×Bp×q=Cm×q\boxed{A_{m \times n} \times B_{p \times q} = C_{m \times q}}

Condition: n=pn = p (number of columns of AA = rows of BB).

  1. Left distributive: A(B+C)=AB+ACA(B + C) = AB + AC
  2. Right distributive: (A+B)C=AC+BC(A + B)C = AC + BC
  3. Associative: A(BC)=(AB)CA(BC) = (AB)C
  4. AI=AAI = A ; I=I = identity matrix.
  5. Multiplication is not commutative: ABBAAB \neq BA
  6. Multiplication by a scalar (kk):

    kAm×n=[kaij] k \cdot A_{m \times n} = [k \cdot a_{ij}]

    Example:

    k[abcd]=[kakbkckd] k \begin{bmatrix} a & b \\ c & d \end{bmatrix} = \begin{bmatrix} ka & kb \\ kc & kd \end{bmatrix}

  7. k(A+B)=kA+kBk(A + B) = kA + kB
  8. k1(k2A)=(k1k2)Ak_1(k_2A) = (k_1k_2)A

Caution:

  • (A+B)2A2+2AB+B2(A + B)^2 \neq A^2 + 2AB + B^2 (because ABBAAB \neq BA).
  • Does not satisfy the cancellation property:
    AB=ACAB = AC does not imply B=CB = C.

3. Properties of Powers

  1. Zero power:

    A0=I A^0 = I

    Where II is the identity matrix.

  2. Positive power (n>0n > 0):

    An=AAAAn factors A^n = \underbrace{AAA \cdots A}_{n \text{ factors}}

  3. Product of powers with the same base:

    ArAs=Ar+s A^r A^s = A^{r+s}

  4. Power of a power:

    (Ar)s=Ars (A^r)^s = A^{rs}

4. Polynomial Matrix

Given a polynomial:

P(x)=a0+a1x+a2x2++anxnP(x) = a_0 + a_1x + a_2x^2 + \cdots + a_nx^n

If AA is a matrix, the matrix evaluation of the polynomial is defined as:

P(A)=a0I+a1A+a2A2++anAnP(A) = a_0I + a_1A + a_2A^2 + \cdots + a_nA^n

Where:

  • II is the identity matrix of the same size as AA.
  • The terms AkA^k are matrix powers.

Types of Matrices

1. Square Matrix

A matrix is square when the number of rows equals the number of columns.
Notation:

An×n=An=[aij]RnA_{n \times n} = A_n = [a_{ij}] \in \mathbb{R}^n

where:

1inand1jn1 \leq i \leq n \quad \text{and} \quad 1 \leq j \leq n

A=[a11]A = \begin{bmatrix} a_{11} \end{bmatrix}

B=[a11a12a21a22]B = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}

C=[a11a12a13a21a22a23a31a32a33]C = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}

D=[a11a12a13a14a21a22a23a24a31a32a33a34a41a42a43a44]D = \begin{bmatrix} a_{11} & a_{12} & a_{13} & a_{14} \\ a_{21} & a_{22} & a_{23} & a_{24} \\ a_{31} & a_{32} & a_{33} & a_{34} \\ a_{41} & a_{42} & a_{43} & a_{44} \end{bmatrix}

E=[a11a12a13a14a15a21a22a23a24a25a31a32a33a34a35a41a42a43a44a45a51a52a53a54a55]E = \begin{bmatrix} a_{11} & a_{12} & a_{13} & a_{14} & a_{15} \\a_{21} & a_{22} & a_{23} & a_{24} & a_{25} \\a_{31} & a_{32} & a_{33} & a_{34} & a_{35} \\a_{41} & a_{42} & a_{43} & a_{44} & a_{45} \\a_{51} & a_{52} & a_{53} & a_{54} & a_{55}\end{bmatrix}

2. Zero (Null) Matrix (θ\theta)

Matrix where all its elements are zero:

Am×n=θ=[aij=0]=[0000] A_{m \times n} = \theta = [a_{ij} = 0] = \begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0 \end{bmatrix}

A=[000000]2×3A = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}_{2 \times 3}

B=[0000000000000000]4×4B = \begin{bmatrix} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{bmatrix}_{4 \times 4}

C=[000]1×3C = \begin{bmatrix} 0 & 0 & 0 \end{bmatrix}_{1 \times 3}

D=[0000]4×1D = \begin{bmatrix} 0 \\0 \\0 \\0 \end{bmatrix}_{4 \times 1}

E=[0]1×1E = \begin{bmatrix} 0 \end{bmatrix}_{1 \times 1}

3. Identity Matrix (InI_n)

Square matrix with ones on the main diagonal and zeros elsewhere:

In×n=[100010001] I_{n \times n} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}

Formal definition:

In×n={aij=1if i=jaij=0if ij I_{n \times n} = \begin{cases} a_{ij} = 1 & \text{if } i = j \\ a_{ij} = 0 & \text{if } i \neq j \end{cases}

I1=[1]I2=[1001]I3=[100010001]I_1 = \begin{bmatrix} 1 \end{bmatrix}\quad I_2 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}\quad I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}

I4=[1000010000100001]I_4 = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}

I5=[1000001000001000001000001]I_5 = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 \end{bmatrix}

4. Row Matrix

Matrix with a single row:

A1×n=[a1j]R1×n A_{1 \times n} = [a_{1j}] \in \mathbb{R}^{1 \times n}

Explicit example:

A1×n=[a11a12a1n] A_{1 \times n} = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \end{bmatrix}

A=[5]A = \begin{bmatrix} 5 \end{bmatrix}

B=[27]B = \begin{bmatrix} -2 & 7 \end{bmatrix}

C=[000]C = \begin{bmatrix} 0 & 0 & 0 \end{bmatrix}

D=[1349]D = \begin{bmatrix} 1 & -3 & 4 & 9 \end{bmatrix}

E=[122π010]E = \begin{bmatrix} \frac{1}{2} & -\sqrt{2} & \pi & 0 & 10 \end{bmatrix}

5. Column Matrix

Matrix with a single column:

Am×1=[ai1]Rm×1 A_{m \times 1} = [a_{i1}] \in \mathbb{R}^{m \times 1}

General form:

Am×1=[a11a21am1] A_{m \times 1} = \begin{bmatrix} a_{11} \\ a_{21} \\ \vdots \\ a_{m1} \end{bmatrix}

A=[3]A = \begin{bmatrix} 3 \end{bmatrix}

B=[14]B = \begin{bmatrix} -1 \\ 4 \end{bmatrix}

C=[000]C = \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}

D=[2571]D = \begin{bmatrix} 2 \\ -5 \\ 7 \\ 1 \end{bmatrix}

E=[323π08]E = \begin{bmatrix} \sqrt{3} \\ \frac{2}{3} \\ -\pi \\ 0 \\ 8 \end{bmatrix}

6. Transpose Matrix (AtA^t)

Given a matrix Am×nA_{m \times n}, its transpose AtA^t is of size n×mn \times m, where rows and columns are swapped:

Definition:

A=[aij]    At=[aji] A = [a_{ij}] \implies A^t = [a_{ji}]

Example:
If A=[a1a2a3]A = \begin{bmatrix} a_1 & a_2 & a_3 \end{bmatrix}, then:

At=[a1a2a3] A^t = \begin{bmatrix} a_1 \\ a_2 \\ a_3 \end{bmatrix}

  1. Rectangular matrix 2×32 \times 3

A=[123456]AT=[142536]A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} \quad \Rightarrow \quad A^T = \begin{bmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{bmatrix}

  1. Column matrix 3×13 \times 1 → becomes a row

B=[207]BT=[207]B = \begin{bmatrix} -2 \\ 0 \\ 7 \end{bmatrix} \quad \Rightarrow \quad B^T = \begin{bmatrix} -2 & 0 & 7 \end{bmatrix}

  1. Row matrix 1×41 \times 4 → becomes a column

C=[5130]CT=[5130]C = \begin{bmatrix} 5 & -1 & 3 & 0 \end{bmatrix} \quad \Rightarrow \quad C^T = \begin{bmatrix} 5 \\ -1 \\ 3 \\ 0 \end{bmatrix}

  1. Symmetric square matrix (its transpose is itself)

D=[210134041]DT=[210134041]=DD = \begin{bmatrix} 2 & -1 & 0 \\ -1 & 3 & 4 \\ 0 & 4 & 1 \end{bmatrix} \quad \Rightarrow \quad D^T = \begin{bmatrix} 2 & -1 & 0 \\ -1 & 3 & 4 \\ 0 & 4 & 1 \end{bmatrix} = D

  1. Non-symmetric square matrix

E=[0235]ET=[0325]E = \begin{bmatrix} 0 & 2 \\ -3 & 5 \end{bmatrix} \quad \Rightarrow \quad E^T = \begin{bmatrix} 0 & -3 \\ 2 & 5 \end{bmatrix}

📑

Properties

  1. (At)t=A(A^t)^t = A
  2. (A+B)t=At+Bt(A + B)^t = A^t + B^t
  3. (AB)t=BtAt(AB)^t = B^t A^t
  4. (kA)t=kAt(kA)^t = kA^t

7. Triangular (Echelon) Matrix

Special case: If AB=θAB = \theta (zero matrix), it does not imply that AA or BB are zero.

Example:

[0210][0120]=[0000]\begin{bmatrix} 0 & 2 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 0 & 1 \\ 2 & 0 \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}

8. Upper Triangular Matrix

Square matrix where elements below the main diagonal are zero:

An×n={aij0if ijaij=0if i>j A_{n \times n} = \begin{cases} a_{ij} \neq 0 & \text{if } i \leq j \\ a_{ij} = 0 & \text{if } i > j \end{cases}

Example (3×33 \times 3):

[a11a12a130a22a2300a33]\begin{bmatrix} a_{11} & a_{12} & a_{13} \\ 0 & a_{22} & a_{23} \\ 0 & 0 & a_{33} \end{bmatrix}

  1. Order 1×1

A=[7]A = \begin{bmatrix} 7 \end{bmatrix}

  1. Order 2×2

B=[3205]B = \begin{bmatrix} 3 & -2 \\ 0 & 5 \end{bmatrix}

  1. Order 3×3

C=[141026003]C = \begin{bmatrix} 1 & 4 & -1 \\ 0 & 2 & 6 \\ 0 & 0 & 3 \end{bmatrix}

  1. Order 4×4

D=[2017013400050002]D = \begin{bmatrix} -2 & 0 & 1 & 7 \\ 0 & 1 & -3 & 4 \\ 0 & 0 & 0 & 5 \\ 0 & 0 & 0 & 2 \end{bmatrix}

  1. Order 3×3 with zeros on the diagonal

E=[025003000]E = \begin{bmatrix} 0 & 2 & -5 \\ 0 & 0 & 3 \\ 0 & 0 & 0 \end{bmatrix}

9. Lower Triangular Matrix

Square matrix where elements above the main diagonal are zero:

An×n={aij0if ijaij=0if i<j A_{n \times n} = \begin{cases} a_{ij} \neq 0 & \text{if } i \geq j \\ a_{ij} = 0 & \text{if } i < j \end{cases}

Example (3×33 \times 3):

[a1100a21a220a31a32a33]\begin{bmatrix} a_{11} & 0 & 0 \\ a_{21} & a_{22} & 0 \\ a_{31} & a_{32} & a_{33} \end{bmatrix}

  1. Order 1×1

A=[4]A = \begin{bmatrix} -4 \end{bmatrix}

  1. Order 2×2

B=[6013]B = \begin{bmatrix} 6 & 0 \\ -1 & 3 \end{bmatrix}

  1. Order 3×3

C=[200510407]C = \begin{bmatrix} 2 & 0 & 0 \\ 5 & -1 & 0 \\ 4 & 0 & 7 \end{bmatrix}

  1. Order 4×4

D=[1000230014500236]D = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 2 & 3 & 0 & 0 \\ -1 & 4 & 5 & 0 \\ 0 & 2 & -3 & 6 \end{bmatrix}

  1. Order 3×3 with zeros on the diagonal

E=[000200150]E = \begin{bmatrix} 0 & 0 & 0 \\ 2 & 0 & 0 \\ -1 & 5 & 0 \end{bmatrix}

10. Diagonal Matrix

A diagonal matrix is a square matrix that is simultaneously upper and lower triangular, where all elements outside the main diagonal are zero.

General definition:

Dn×n=[d1000d2000dn] D_{n \times n} = \begin{bmatrix} d_1 & 0 & \cdots & 0 \\ 0 & d_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & d_n \end{bmatrix}

Formal definition:

Dn×n={aij0if i=jaij=0if ij D_{n \times n} = \begin{cases} a_{ij} \neq 0 & \text{if } i = j \\ a_{ij} = 0 & \text{if } i \neq j \end{cases}

Power property:
The kk-th power of a diagonal matrix is calculated by raising each diagonal element to that power:

Dk=[d1k000d2k000dnk] D^k = \begin{bmatrix} d_1^k & 0 & \cdots & 0 \\ 0 & d_2^k & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & d_n^k \end{bmatrix}

Example:

D=[500030007] D = \begin{bmatrix} -5 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 7 \end{bmatrix}

11. Inverse Diagonal Matrix

For a non-singular diagonal matrix (where all diagonal elements di0d_i \neq 0), its inverse is calculated by taking the reciprocal of each diagonal element:

D1=[1d10001d20001dn] D^{-1} = \begin{bmatrix} \frac{1}{d_1} & 0 & \cdots & 0 \\ 0 & \frac{1}{d_2} & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \frac{1}{d_n} \end{bmatrix}

Condition: All did_i must be non-zero for D1D^{-1} to exist.

12. Conjugate Matrix

Given a matrix AA with complex elements, its conjugate matrix A\overline{A} is obtained by conjugating each element of AA.

📑

Properties

  1. Double conjugation: A=A\overline{\overline{A}} = A
  2. Conjugate of the transpose: At=(A)t\overline{A^t} = (\overline{A})^t
  3. Conjugation and scalars: For kCk \in \mathbb{C}, kA=kA\overline{kA} = \overline{k} \cdot \overline{A}
  4. Conjugation of the sum: A+B=A+B\overline{A + B} = \overline{A} + \overline{B}
  5. Conjugation of the product: AB=AB\overline{AB} = \overline{A} \cdot \overline{B}

Example:

A=[i1i312i]    A=[i1+i31+2i] A = \begin{bmatrix} i & 1 - i \\ 3 & 1 - 2i \end{bmatrix} \implies \overline{A} = \begin{bmatrix} -i & 1 + i \\ 3 & 1 + 2i \end{bmatrix}


Special Matrices

1. Symmetric Matrix

A square matrix An×n=[aij]A_{n \times n} = [a_{ij}] is symmetric if and only if:

A=At A = A^t

📑

Characteristics:

  • aij=ajia_{ij} = a_{ji} for all i,ji, j
    Examples:
  • Every diagonal matrix is symmetric

2. Antisymmetric (Skew-Symmetric) Matrix

A square matrix An×n=[aij]A_{n \times n} = [a_{ij}] is antisymmetric if and only if:

At=A A^t = -A

📑

Properties:

  • The diagonal elements are zero (aii=0a_{ii} = 0)
  • aij=ajia_{ij} = -a_{ji} for iji \neq j

Examples:

A=[012103230] A = \begin{bmatrix} 0 & 1 & 2 \\ -1 & 0 & 3 \\ -2 & -3 & 0 \end{bmatrix}

3. Normal Matrix

A matrix is normal if it commutes with its transpose:

AAt=AtAA \cdot A^t = A^t \cdot A

Includes:

  • Symmetric matrices
  • Antisymmetric matrices
  • Unitary matrices

4. Singular Matrix

A square matrix is singular if:

det(A)=0\det(A) = 0

Consequence:

  • It does not have an inverse
  • Its rank is less than nn

5. Regular (Non-singular) Matrix

A square matrix is regular if:

det(A)0andρ(A)=n\det(A) \neq 0 \quad \text{and} \quad \rho(A) = n

📑

Properties

  • It has an inverse
  • It is invertible

6. Periodic Matrix

A matrix is periodic if there exists kZ+k \in \mathbb{Z}^+ such that:

Ak+1=AA^{k+1} = A

Special case:
If Ak=IA^k = I, it is said to have period kk

Ak+1=A,Ak+2=A2,A^{k+1} = A, \quad A^{k+2} = A^2, \quad \ldots

7. Idempotent Matrix

A square matrix is idempotent if:

A2=AA^2 = A

A=[135135135]A7=A A = \begin{bmatrix} -1 & 3 & 5 \\ 1 & -3 & -5 \\ -1 & 3 & 5 \end{bmatrix} \quad \Rightarrow \quad A^7 = A

📑

Properties

  • An=AA^n = A for all n1n \geq 1
  • Its eigenvalues are 0 or 1

8. Nilpotent Matrix

A square matrix AA is nilpotent if there exists an integer k2k \geq 2 such that:

Ak=θ A^k = \theta

where θ\theta is the zero matrix. The smallest kk that satisfies this condition is called the index of nilpotency.

A=[2142] A = \begin{bmatrix} 2 & -1 \\ 4 & -2 \end{bmatrix}

Verification:

A2=[0000] A^2 = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}

📑

Properties

  • Ak+1=Ak+2==θA^{k+1} = A^{k+2} = \cdots = \theta for every exponent greater than or equal to kk
  • All its eigenvalues are zero

9. Involutory Matrix

A square matrix AA is involutory if it satisfies:

A2=I A^2 = I

That is, its square is the identity matrix.

Behavior for powers:

  • Ak=AA^k = A if kk is odd
  • Ak=IA^k = I if kk is even
  1. A=[1001] A = \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix}

  2. A=[111010001] A = \begin{bmatrix} 1 & 1 & 1 \\ 0 & -1 & 0 \\ 0 & 0 & -1 \end{bmatrix}

📑

Property

  • A1=AA^{-1} = A (its inverse is itself)

10. Orthogonal Matrix

A square matrix AA is orthogonal if it satisfies:

AAt=AtA=I A A^t = A^t A = I

which implies that:

A1=At A^{-1} = A^t

A=[sinxcosxcosxsinx] A = \begin{bmatrix} \sin x & -\cos x \\ \cos x & \sin x \end{bmatrix}

Verification:

AAt=[sin2x+cos2x00sin2x+cos2x]=[1001] A A^t = \begin{bmatrix} \sin^2 x + \cos^2 x & 0 \\ 0 & \sin^2 x + \cos^2 x \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}

📑

Properties

  • Preserves the inner product (Av=v\|A\mathbf{v}\| = \|\mathbf{v}\|)
  • Its columns form an orthonormal basis
  • det(A)=±1\det(A) = \pm 1

Fundamental relation:

sin2x+cos2x=1 \sin^2 x + \cos^2 x = 1

11. Hermitian Matrix

A complex square matrix ACn×nA \in \mathbb{C}^{n \times n} is Hermitian if it coincides with its conjugate transpose:

A=AwhereA=(A)t A = A^* \quad \text{where} \quad A^* = (\overline{A})^t

A=[4i3+2ii347i32i4+7i6] A = \begin{bmatrix} 4 & -i & 3 + 2i \\ i & -3 & 4 - 7i \\ 3 - 2i & 4 + 7i & 6 \end{bmatrix}

📑

Properties

  1. Real diagonal: The elements aiia_{ii} are real.
  2. Conjugate symmetry: aij=ajia_{ij} = \overline{a_{ji}}.
  3. Real eigenvalues: All its eigenvalues are real numbers.

12. Skew-Hermitian (Antihermitian) Matrix

A complex square matrix ACn×nA \in \mathbb{C}^{n \times n} is skew-Hermitian if:

A=AwhereA=(A)t A = -A^* \quad \text{where} \quad A^* = (\overline{A})^t

A=[01i4+3i1ii34+3i30] A = \begin{bmatrix} 0 & 1 - i & 4 + 3i \\ -1 - i & i & -3 \\ -4 + 3i & 3 & 0 \end{bmatrix}

📑

Properties

  1. Pure imaginary diagonal: The elements aiia_{ii} are pure imaginary (or zero).
  2. Skew-conjugate symmetry: aij=ajia_{ij} = -\overline{a_{ji}}.
  3. Pure imaginary eigenvalues: All its eigenvalues are pure imaginary numbers.

Relation between Hermitian and Skew-Hermitian matrices:

  • Any complex matrix BB can be written as:

    B=H+K B = H + K

    where HH is Hermitian (H=B+B2H = \frac{B + B^*}{2}) and KK is skew-Hermitian (K=BB2K = \frac{B - B^*}{2}).

Alternative notation:

  • AA^* or AA^\dagger denotes the conjugate transpose (adjoint).
  • In physics, Hermitian matrices are fundamental for quantum operators.