# New identity matrix constructor (0.7) in 0.6

**URL:** <https://discourse.julialang.org/t/new-identity-matrix-constructor-0-7-in-0-6/10172>\
**Category:** General Usage\
**Created:** [April 5, 2018, 10:04am UTC](https://discourse.julialang.org/t/new-identity-matrix-constructor-0-7-in-0-6/10172 "2018-04-05T10:04:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonas-kr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonas-kr/32/1810_2.png) [@jonas-kr](https://discourse.julialang.org/u/jonas-kr)\
**Post date:** [April 5, 2018, 10:04am UTC](https://discourse.julialang.org/t/new-identity-matrix-constructor-0-7-in-0-6/10172/1 "2018-04-05T10:04:40Z")

</div>

I noticed some rather strange behavior running julia 0.6.2. On a ‘fresh’ instance of julia without any packages,

`Matrix(1.0I, 3, 3)`

does not work. However, as soon as I load the BenchmarkTools package, the identity matrix is returned as it would be expected in julia 0.7.

Skimming the source code of BenchmarkTools I did not find a new constructor for the Matrix type…

Does anyone know what is going on?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [April 5, 2018, 10:10am UTC](https://discourse.julialang.org/t/new-identity-matrix-constructor-0-7-in-0-6/10172/2 "2018-04-05T10:10:32Z")

</div>

I think that BenchmarkTools.jl loads Compat.jl, which defines the relevant method. Try

```julia
@edit Matrix(1.0I, 3, 3)

```

---

<div class="post-metadata">

**Author:** ![jonas-kr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonas-kr/32/1810_2.png) [@jonas-kr](https://discourse.julialang.org/u/jonas-kr)\
**Post date:** [April 5, 2018, 10:22am UTC](https://discourse.julialang.org/t/new-identity-matrix-constructor-0-7-in-0-6/10172/3 "2018-04-05T10:22:18Z")

</div>

Thank you for your fast reply! That’s it.
