Matrix and Inverse matrix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Budiman
    New Member
    • Nov 2006
    • 21

    Matrix and Inverse matrix

    Hello friends, i need help for my assignment.
    For example i give input for a, b, c, d in matrix mode example like
    |a b|
    |c d|
    and i want to convert it to invers from that matrix, i hope you give the answer(if possible with the explanation).
    Thx so much for your help
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by Budiman
    Hello friends, i need help for my assignment.
    For example i give input for a, b, c, d in matrix mode example like
    |a b|
    |c d|
    and i want to convert it to invers from that matrix, i hope you give the answer(if possible with the explanation).
    Thx so much for your help
    Have you made any sort of a start on this?

    Comment

    • Budiman
      New Member
      • Nov 2006
      • 21

      #3
      Originally posted by Killer42
      Have you made any sort of a start on this?
      Sorry i don't understand your question.
      Can you just make the program?
      in 4 variable in matrix i want it to be invers matrix

      Comment

      • sashi
        Recognized Expert Top Contributor
        • Jun 2006
        • 1749

        #4
        Originally posted by Budiman
        Sorry i don't understand your question.
        Can you just make the program?
        in 4 variable in matrix i want it to be invers matrix
        Hi there,

        Killer42 was trying to ask if you have started your initial programming, hope you understand clearly now. Sorry, at the TheScripts we do not provide programming services, instead, we help programmers to debug their code segment. Take care.

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          Originally posted by sashi
          Killer42 was trying to ask if you have started your initial programming, hope you understand clearly now. Sorry, at the TheScripts we do not provide programming services, instead, we help programmers to debug their code segment.
          Or to put it another way, we're here to help, not to do everything for you.

          Comment

          • Budiman
            New Member
            • Nov 2006
            • 21

            #6
            ooo i understand that situation, actually i don;t understandf anything in visual basic but i can understand in C++. My teacher ask me to make program in visual basic.
            First i need your help to teach me alittle bit or you please give me your thinking than i make the program my self

            Comment

            • dwadish
              New Member
              • Nov 2006
              • 129

              #7
              Originally posted by Budiman
              Hello friends, i need help for my assignment.
              For example i give input for a, b, c, d in matrix mode example like
              |a b|
              |c d|
              and i want to convert it to invers from that matrix, i hope you give the answer(if possible with the explanation).
              Thx so much for your help
              i will help you with a suitable example tomorrow.

              Comment

              • Killer42
                Recognized Expert Expert
                • Oct 2006
                • 8429

                #8
                Originally posted by dwadish
                i will help you with a suitable example tomorrow.
                Actually, I'm glad someone can help. I didn't really follow the question all that well, and don't know anything much about matrices.

                Comment

                • DeMan
                  Top Contributor
                  • Nov 2006
                  • 1799

                  #9
                  Basically, we want to try to conver the matrix into
                  |1 0|
                  |0 1| (called I)

                  and record what we do on another I matrix. If an inverse exists we will be able to reduce our matrix to the I matrix. Thus we could begin:
                  |a, b|
                  |c, d|
                  and reduce it into row echelon form (hopefully ending in I), while keeping track of our steps with a copy of I.

                  Thankfully there are shortcuts that have been found, and for a 2D matrix it makes things pretty simple. Let us assume we have a matrix :
                  Code:
                  |a, b|               = A
                  |c, d|
                  we first calculate the determinant =ad -bc

                  Then the inverse matrix (assuming the determinant (denoted |A| ) is
                  Code:
                  1/|A|     *      |d, -b|
                                   |-c, a|
                  ie:

                  Code:
                  |d/(ad-bc), b/(bc-ad)|
                  |c/(bc-ad), a/(ad-bc)| //notice I have eliminted the signs by swapping the order of the eq'n in the denominator
                  Incidentally (and I'm sure you're not really interested, but this idea can be extended for larger matrices also).

                  THUS: All you need to do is write code to take 4 inputs (from text boxes arranged as a matrix) and to output four labels (again arranged as a matrix) solved using the equations above. Hope this helps!!! (If you are still having trouble, I may be able to help, but as I mentioned VB is not really my forte'....)

                  Comment

                  • vba
                    New Member
                    • Jun 2007
                    • 1

                    #10
                    Plz i want a VB code for matrix inverse as early as possible.plz can u help me.

                    Comment

                    • dwadish
                      New Member
                      • Nov 2006
                      • 129

                      #11
                      any where you can use two for loops with decriment mode

                      That you are inserted with two for loops thus wise you can diplay it easily through reversing the loop

                      eg:inserting through i=i+1 and j=j+1
                      and also use this as a i=i-1 and j also

                      but just change your condition in the loop also

                      tell r u with vb.net

                      then inform me just some changes

                      it is just an idea
                      and impliment with your own logic
                      best of luck

                      Comment

                      • DeMan
                        Top Contributor
                        • Nov 2006
                        • 1799

                        #12
                        depending on the size there is plenty of information all ready here. Perhaps you might like to read the posting Guidelines, especially with regard to asking for code.

                        Basically, the experts here are more than happy to help you with a problem, but are not here to solve all your problems (if you are a student, it defeats the purpose of study, and if you are working you are getting paid to solve the problem, not the experts here)..While you will find the experts more than willing to helop you work through a problem, you will not find them willing to give a chunk of code. The idea is to help you work thorugh the problem, so that you know how to approach a similar one next time!!

                        Comment

                        Working...