# Solving A\*x=b in Nemo

**URL:** <https://discourse.julialang.org/t/solving-a-x-b-in-nemo/101051>\
**Category:** General Usage\
**Tags:** matrices, convert, nemo\
**Created:** [July 1, 2023, 1:04pm UTC](https://discourse.julialang.org/t/solving-a-x-b-in-nemo/101051 "2023-07-01T13:04:09Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![thofma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thofma/32/1691_2.png) [@thofma](https://discourse.julialang.org/u/thofma)\
**Post date:** [July 3, 2023, 7:30am UTC](https://discourse.julialang.org/t/solving-a-x-b-in-nemo/101051/8 "2023-07-03T07:30:06Z")

</div>

Yes. By the way, if you want to convert to `Matrix{Int}`, the correct way would be

```julia
julia> A = QQFieldElem[1 0 0; 0 1 1; 0 3 0; 0 0 1]
4×3 Matrix{QQFieldElem}:
 1 0 0
 0 1 1
 0 3 0
 0 0 1

julia> map(x -> Int(ZZ(x)), A)
4×3 Matrix{Int64}:
 1 0 0
 0 1 1
 0 3 0
 0 0 1

```

The version with `x.num` will give (silently) wrong results:

```julia
julia> A = QQFieldElem[1 0 0; 0 1 1; 0 3 0; 0 0 18446744073709551615]
4×3 Matrix{QQFieldElem}:
 1 0 0
 0 1 1
 0 3 0
 0 0 18446744073709551615

julia> Aint = conv2int(A)
4×3 Matrix{Int64}:
 1 0 0
 0 1 1
 0 3 0
 0 0 4611686018537972628

```

---

_[View the full topic](https://discourse.julialang.org/t/solving-a-x-b-in-nemo/101051)._
