Share via


Matrix.Identity Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns an instance of the identity matrix.

Namespace:  Microsoft.Xna.Framework
Assembly:  Microsoft.Xna.Framework.Math (in Microsoft.Xna.Framework.Math.dll)

Syntax

'Declaration
Public Shared ReadOnly Property Identity As Matrix
public static Matrix Identity { get; }

Property Value

Type: Microsoft.Xna.Framework.Matrix
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.

NoteNote:

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

Version Information

Silverlight

Supported in: 5

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.