Results 1 to 4 of 4
Like Tree1Thanks
  • 1 Post By emakarov

Math Help - Array in MHL Latex

  1. #1
    Member
    Joined
    Nov 2012
    From
    Normal, IL USA
    Posts
    149
    Thanks
    24

    Array in MHL Latex

    I tried to create a 7x5 matrix in MHL latex. I wrote this code, but I keep getting an "invalid equation" error. I really don't know what I did wrong. Can anybody point out my mistake? Thanks.

    \begin{array}{cc}1&0&0&0&0\\0&1&0&0&0\\0&0&1&0&0\\ 0&0&0&1&0\\0&0&0&0&1\\0&0&0&0&0\\0&0&0&0&0\end{arr ay}

    \begin{array}{cc}1&0&0&0&0\\0&1&0&0&0\\0&0&1&0&0\\ 0&0&0&1&0\\0&0&0&0&1\\0&0&0&0&0\\end{array}" alt="\begin{array}{cc}1&0&0&0&0\\0&1&0&0&0\\0&0&1&0&0\\ 0&0&0&1&0\\0&0&0&0&1\\0&0&0&0&0\\end{array}" />
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Forum Admin topsquark's Avatar
    Joined
    Jan 2006
    From
    Wellsville, NY
    Posts
    9,668
    Thanks
    298
    Awards
    1

    Re: Array in MHL Latex

    There are some small changes I made. First off I've never liked the "array" command...I prefer "matrix." Second, I moved the "tex" command to be sandwiched between the "font" and "color." I don't see any actual color there so maybe something else needs to be done. Third, there was a \\end. I removed the extra \.


    [tex]\begin{matrix}1&0&0&0&0\\0&1&0&0&0\\0&0&1&0&0\\0&0 &0&1&0\\0&0&0&0&1\\0&0&0&0&0\\0&0&0&0&0\end{matrix }[/tex]


    [TEX]\begin{matrix}1&0&0&0&0\\0&1&0&0&0\\0&0&1&0&0\\0&0 &0&1&0\\0&0&0&0&1\\0&0&0&0&0\end{matrix}[/TEX]

    gives

    \begin{matrix}1&0&0&0&0\\0&1&0&0&0\\0&0&1&0&0\\0&0  &0&1&0\\0&0&0&0&1\\0&0&0&0&0\\0&0&0&0&0\end{matrix  }


    \begin{matrix}1&0&0&0&0\\0&1&0&0&0\\0&0&1&0&0\\0&0  &0&1&0\\0&0&0&0&1\\0&0&0&0&0\end{matrix}" alt="\begin{array}{cc}1&0&0&0&0\\0&1&0&0&0\\0&0&1&0&0\\ 0&0&0&1&0\\0&0&0&0&1\\0&0&0&0&0\\end{array}"" alt=" alt="\begin{array}{cc}1&0&0&0&0\\0&1&0&0&0\\0&0&1&0&0\\ 0&0&0&1&0\\0&0&0&0&1\\0&0&0&0&0\\end{array}"" />

    I don't know what "alt = " is supposed to do. Sorry!

    -Dan
    Last edited by topsquark; June 10th 2013 at 07:55 PM.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,417
    Thanks
    718

    Re: Array in MHL Latex

    Matrix:

    \begin{matrix}1&0&0&0&0\\0&1&0&0&0\\0&0&1&0&0\\0&0  &0&1&0\\0&0&0&0&1\\0&0&0&0&0\\0&0&0&0&0\end{matrix  }

    Array:

    \begin{array}{ccccc}1&0&0&0&0\\ 0&1&0&0&0\\ 0&0&1&0&0\\ 0&0&0&1&0\\ 0&0&0&0&1\\ 0&0&0&0&0 \end{array}

    Insert spaces at least every 50 characters, but avoid newlines in math formulas.
    Thanks from topsquark
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Nov 2012
    From
    Normal, IL USA
    Posts
    149
    Thanks
    24

    Re: Array in MHL Latex

    So that's it! You have to include {ccccc} in the array command for five columns! Maybe that should be explained in our pdf handout. Many thanks.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. A problem with LateX array
    Posted in the LaTeX Help Forum
    Replies: 6
    Last Post: March 28th 2011, 07:28 PM
  2. Array Help
    Posted in the LaTeX Help Forum
    Replies: 1
    Last Post: January 31st 2011, 06:42 AM
  3. Number array
    Posted in the Number Theory Forum
    Replies: 3
    Last Post: October 24th 2009, 01:50 AM
  4. array help
    Posted in the LaTeX Help Forum
    Replies: 1
    Last Post: October 12th 2008, 04:42 PM
  5. array
    Posted in the LaTeX Help Forum
    Replies: 3
    Last Post: October 8th 2008, 12:43 PM

Search Tags


/mathhelpforum @mathhelpforum