In [1]:
IRuby.display(Complex(1,2))


Out[1]:
$1+2\imath$

In [2]:
require 'matrix'
IRuby.display(Matrix[[1,2],[3,4]])
IRuby.display(Matrix[[1,2],[3,4]],format:'latex')
IRuby.display(Matrix[[1,2],[3,4]],'text/plain')
IRuby.display(Matrix[[1,2],[3,4]],mime:'text/plain')
IRuby.display(Matrix[[1,2],[3,4]],'html')


Out[2]:
$$\left(\begin{array}{cc} 1&2\\ 3&4\\ \end{array}\right)$$
Out[2]:
$$\left(\begin{array}{cc} 1&2\\ 3&4\\ \end{array}\right)$$
Out[2]:
Matrix[[1, 2], [3, 4]]
Out[2]:
Matrix[[1, 2], [3, 4]]
Out[2]:
12
34

In [3]: