# Unintuitive Julia result: selecting a row from a matrix

**URL:** <https://discourse.julialang.org/t/unintuitive-julia-result-selecting-a-row-from-a-matrix/66222>\
**Category:** New to Julia\
**Created:** [August 11, 2021, 7:25pm UTC](https://discourse.julialang.org/t/unintuitive-julia-result-selecting-a-row-from-a-matrix/66222 "2021-08-11T19:25:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [August 11, 2021, 7:26pm UTC](https://discourse.julialang.org/t/unintuitive-julia-result-selecting-a-row-from-a-matrix/66222/2 "2021-08-11T19:26:44Z")

</div>

> [@Why column major?](https://discourse.julialang.org/t/why-column-major/24374/4):
>
> As I understand it, it was mainly historical precedent, driven by the fact that most linear-algebra libraries (LAPACK etc.) are column-major (because Fortran is column-major, and hence Matlab is column-major), though it would have been possible to work around this with judicious use of transposition. It’s been discussed before, e.g. [https://groups.google.com/d/msg/julia-users/GkvDunqE0ww/2gIDmA5cAAAJ](https://groups.google.com/d/msg/julia-users/GkvDunqE0ww/2gIDmA5cAAAJ)

```julia
julia> x[1,:] # this returns a Vector, which is a column

julia> x[1,:]' # this traspose the Vector into a row-vector

```

---

_[View the full topic](https://discourse.julialang.org/t/unintuitive-julia-result-selecting-a-row-from-a-matrix/66222)._
