|
SOLUTIONS
|
Mathematica
>
Mathematics and Algorithms
>
Matrices and Linear Algebra
>
Constructing Matrices
>
IdentityMatrix
BUILT-IN MATHEMATICA SYMBOL
IdentityMatrix
IdentityMatrix[n]
gives the n
n identity matrix.
Details and OptionsDetails and Options
- IdentityMatrix[{m, n}] gives the m
n identity matrix. - IdentityMatrix by default creates a matrix containing exact integers.
- The option WorkingPrecision can be used to specify the precision of matrix elements.
- IdentityMatrix[n, SparseArray] gives the identity matrix as a SparseArray object.
ExamplesExamplesopen allclose all
Basic Examples (1)Basic Examples (1)
Construct a 3×3 identity matrix:
| In[1]:= |
Out[1]//MatrixForm= | |
New in 1 | Last modified in 7
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
