Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6997819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:19:54+00:00 2026-05-27T20:19:54+00:00

Is there a way to make MatrixForm display a row vector horizontally on the

  • 0

Is there a way to make MatrixForm display a row vector horizontally on the line and not vertically as it does for column vectors? As this confuses me sometimes. Do you think it will be hard to write wrapper around matrix form to adjust this behavior?

For example, here is a 2 by 2 matrix. The rows display the same as the columns. Both are shown vertical.

enter image description here

Question: Is it possible to make MatrixForm display row vectors laid out horizontally and not vertically?

Sorry if this was asked before, a quick search shows nothing.

thanks

update (1)

fyi, this is in Matlab, it prints rows horizontally and column vertically automatically, I was hoping for something like this. But I’ll use suggestion by Heike below for now as it solves this at the cost of little extra typing.

enter image description here

update (2)
Using Hilderic solution is nice also, I always had hard time printing 3D matrix in a way I can read it. Here it is now using the {} trick

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:19:55+00:00Added an answer on May 27, 2026 at 8:19 pm

    For both arrayname[[All,1]] and arrayname[[1,All]], Part delivers a vector, and MatrixForm has no way of determining which “orientation” it has. Accordingly, it always prints vectors as columns.

    About the only thing you can do is provide your own output routine for row vectors, e.g., by wrapping it in an enclosing list, converting it back to a (single-row) matrix:

    rowVector[a_List] := MatrixForm[{a}]
    columnVector = MatrixForm   (*for symmetry*)
    

    It’s still up to you to remember whether a vector came from a row or a column, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to make a Radio Button enabled/disabled (not checked/unchecked) via CSS?
Is there a way to make OpenGL transform a general vector I give it
is there way make swf like this : via AS?
Is there a way to make this code work without a Warning? function myFunction($value,
Is there a way to make a jqGrid column autosize so that the contents
Is there a way to make a dialog (CDialog) not descendant of the main
Is there a way to make this <a> element do a php function or
Is there any way to make search query accent insensitive? the column's and table's
Is there a way to make this code more simplified? <input type=text id=tags />
Is there a way to make this way of making a Union of 2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.