Share via


Matrix.Identity Property

Returns an instance of the identity matrix.

Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public static Matrix Identity { get; }

Property Value

The identity matrix.

Remarks

Except for the main diagonal, whose elements are all ones, the identity matrix is a square matrix composed of zeros. Unlike all other matrix multiplications, the multiplication between an identity matrix and another matrix is commutative.

This is useful for initializing a matrix to a known value before you perform additional operations, such as a transformation.

Note

Multiplying a matrix with its inverse results in an identity matrix.

See Also

Reference

Invert
Matrix Structure
Matrix Members
Microsoft.Xna.Framework Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone