Identity Matrices

Prerequisites

Matrices Show

Matrix Transposition Show

Symmetric Matrices Show

Diagonal and Scalar Matrices Show

Identity Matrices

Introduction

An identity matrix is a special type of scalar matrix in which all elements along the main diagonal are equal to 1 and all other elements are 0.

Example

code (Python)

import numpy as np

a = np.identity(4)
print(a)