# Creating Column Matrix with Array Literals

**URL:** <https://discourse.julialang.org/t/creating-column-matrix-with-array-literals/53742>\
**Category:** General Usage\
**Tags:** array\
**Created:** [January 21, 2021, 7:54pm UTC](https://discourse.julialang.org/t/creating-column-matrix-with-array-literals/53742 "2021-01-21T19:54:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [January 21, 2021, 7:59pm UTC](https://discourse.julialang.org/t/creating-column-matrix-with-array-literals/53742/2 "2021-01-21T19:59:54Z")

</div>

> [@dariush-bahrami](#):
>
> I think this a little inconsistency in Julia syntax.

No, because 1d arrays are treated as column vectors in all of the Julia linear-algebra routines. (Because of this, it’s not clear why you need to create a 1-column matrix instead of a 1d array?)

You could use `reshape([1,2],2,1)`.

(It might also make sense to have a constructor `Matrix(x::Vector) = reshape(x, length(x), 1)`; currently there is no such constructor defined in Base.)

See also [this discussion](https://discourse.julialang.org/t/vector-vs-column-vector/34699) and [issue #17084](https://github.com/JuliaLang/julia/issues/17084).

---

_[View the full topic](https://discourse.julialang.org/t/creating-column-matrix-with-array-literals/53742)._
