$AB=0$ solving for matrices in MatLab











up vote
2
down vote

favorite












I have the equation $AB = 0$, where $A$ and $B$ are matrices. And I know a matrix $B$ and want to find a matrix $A$.



How can I do it in MatLab?










share|cite|improve this question
























  • Are there any hypothesis on $B$ ?
    – nicomezi
    Nov 13 at 11:16












  • I know only that matrix $A$ may be in view as $A=(I_k P)$
    – Multifora
    Nov 13 at 11:23












  • Type help null into the command window.
    – user1551
    Nov 13 at 13:09















up vote
2
down vote

favorite












I have the equation $AB = 0$, where $A$ and $B$ are matrices. And I know a matrix $B$ and want to find a matrix $A$.



How can I do it in MatLab?










share|cite|improve this question
























  • Are there any hypothesis on $B$ ?
    – nicomezi
    Nov 13 at 11:16












  • I know only that matrix $A$ may be in view as $A=(I_k P)$
    – Multifora
    Nov 13 at 11:23












  • Type help null into the command window.
    – user1551
    Nov 13 at 13:09













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I have the equation $AB = 0$, where $A$ and $B$ are matrices. And I know a matrix $B$ and want to find a matrix $A$.



How can I do it in MatLab?










share|cite|improve this question















I have the equation $AB = 0$, where $A$ and $B$ are matrices. And I know a matrix $B$ and want to find a matrix $A$.



How can I do it in MatLab?







matrices matlab matrix-equations






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 13 at 11:13









amWhy

191k27223437




191k27223437










asked Nov 13 at 11:06









Multifora

162




162












  • Are there any hypothesis on $B$ ?
    – nicomezi
    Nov 13 at 11:16












  • I know only that matrix $A$ may be in view as $A=(I_k P)$
    – Multifora
    Nov 13 at 11:23












  • Type help null into the command window.
    – user1551
    Nov 13 at 13:09


















  • Are there any hypothesis on $B$ ?
    – nicomezi
    Nov 13 at 11:16












  • I know only that matrix $A$ may be in view as $A=(I_k P)$
    – Multifora
    Nov 13 at 11:23












  • Type help null into the command window.
    – user1551
    Nov 13 at 13:09
















Are there any hypothesis on $B$ ?
– nicomezi
Nov 13 at 11:16






Are there any hypothesis on $B$ ?
– nicomezi
Nov 13 at 11:16














I know only that matrix $A$ may be in view as $A=(I_k P)$
– Multifora
Nov 13 at 11:23






I know only that matrix $A$ may be in view as $A=(I_k P)$
– Multifora
Nov 13 at 11:23














Type help null into the command window.
– user1551
Nov 13 at 13:09




Type help null into the command window.
– user1551
Nov 13 at 13:09










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Let us assume that all matrices involved are square ($n times n$).



You have first to convert your issue by transposition :



$B^T A^T = 0$



which amounts to say :



$$B^T [V_1 |V_2|...|V_n] = [0 | 0 | ... | 0] iff forall i, B^T V_i=0$$



which means that all $V_i$ should belong to the kernel of $B^T$, giving a manner to build such matrices.



Particular cases :




  • a) The kernel of $B^T$ is reduced to ${0}$ : only the null matrix is possible for $A$.


  • b) The kernel of $B^T$ has dimension 1, with basis $V$, then $A^T=[a_1V|a_2V|...|a_nV]$.



Let us take an example for case (b):



  B=[1 2 3
2 2 4
3 5 8];% matrix with rank<3, here rank(B)=2, thus dim(ker(B'))=1
K=null(B'); % the columns of K are a basis of the Kernel
V=K(:,1); % in fact, in this case, V and K are identical
a=rand(1,3);
A=[a(1)*V,a(2)*V,a(3)*V]';% note the transposition operator
A*B,%test : must be zero





share|cite|improve this answer























    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2996601%2fab-0-solving-for-matrices-in-matlab%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Let us assume that all matrices involved are square ($n times n$).



    You have first to convert your issue by transposition :



    $B^T A^T = 0$



    which amounts to say :



    $$B^T [V_1 |V_2|...|V_n] = [0 | 0 | ... | 0] iff forall i, B^T V_i=0$$



    which means that all $V_i$ should belong to the kernel of $B^T$, giving a manner to build such matrices.



    Particular cases :




    • a) The kernel of $B^T$ is reduced to ${0}$ : only the null matrix is possible for $A$.


    • b) The kernel of $B^T$ has dimension 1, with basis $V$, then $A^T=[a_1V|a_2V|...|a_nV]$.



    Let us take an example for case (b):



      B=[1 2 3
    2 2 4
    3 5 8];% matrix with rank<3, here rank(B)=2, thus dim(ker(B'))=1
    K=null(B'); % the columns of K are a basis of the Kernel
    V=K(:,1); % in fact, in this case, V and K are identical
    a=rand(1,3);
    A=[a(1)*V,a(2)*V,a(3)*V]';% note the transposition operator
    A*B,%test : must be zero





    share|cite|improve this answer



























      up vote
      0
      down vote













      Let us assume that all matrices involved are square ($n times n$).



      You have first to convert your issue by transposition :



      $B^T A^T = 0$



      which amounts to say :



      $$B^T [V_1 |V_2|...|V_n] = [0 | 0 | ... | 0] iff forall i, B^T V_i=0$$



      which means that all $V_i$ should belong to the kernel of $B^T$, giving a manner to build such matrices.



      Particular cases :




      • a) The kernel of $B^T$ is reduced to ${0}$ : only the null matrix is possible for $A$.


      • b) The kernel of $B^T$ has dimension 1, with basis $V$, then $A^T=[a_1V|a_2V|...|a_nV]$.



      Let us take an example for case (b):



        B=[1 2 3
      2 2 4
      3 5 8];% matrix with rank<3, here rank(B)=2, thus dim(ker(B'))=1
      K=null(B'); % the columns of K are a basis of the Kernel
      V=K(:,1); % in fact, in this case, V and K are identical
      a=rand(1,3);
      A=[a(1)*V,a(2)*V,a(3)*V]';% note the transposition operator
      A*B,%test : must be zero





      share|cite|improve this answer

























        up vote
        0
        down vote










        up vote
        0
        down vote









        Let us assume that all matrices involved are square ($n times n$).



        You have first to convert your issue by transposition :



        $B^T A^T = 0$



        which amounts to say :



        $$B^T [V_1 |V_2|...|V_n] = [0 | 0 | ... | 0] iff forall i, B^T V_i=0$$



        which means that all $V_i$ should belong to the kernel of $B^T$, giving a manner to build such matrices.



        Particular cases :




        • a) The kernel of $B^T$ is reduced to ${0}$ : only the null matrix is possible for $A$.


        • b) The kernel of $B^T$ has dimension 1, with basis $V$, then $A^T=[a_1V|a_2V|...|a_nV]$.



        Let us take an example for case (b):



          B=[1 2 3
        2 2 4
        3 5 8];% matrix with rank<3, here rank(B)=2, thus dim(ker(B'))=1
        K=null(B'); % the columns of K are a basis of the Kernel
        V=K(:,1); % in fact, in this case, V and K are identical
        a=rand(1,3);
        A=[a(1)*V,a(2)*V,a(3)*V]';% note the transposition operator
        A*B,%test : must be zero





        share|cite|improve this answer














        Let us assume that all matrices involved are square ($n times n$).



        You have first to convert your issue by transposition :



        $B^T A^T = 0$



        which amounts to say :



        $$B^T [V_1 |V_2|...|V_n] = [0 | 0 | ... | 0] iff forall i, B^T V_i=0$$



        which means that all $V_i$ should belong to the kernel of $B^T$, giving a manner to build such matrices.



        Particular cases :




        • a) The kernel of $B^T$ is reduced to ${0}$ : only the null matrix is possible for $A$.


        • b) The kernel of $B^T$ has dimension 1, with basis $V$, then $A^T=[a_1V|a_2V|...|a_nV]$.



        Let us take an example for case (b):



          B=[1 2 3
        2 2 4
        3 5 8];% matrix with rank<3, here rank(B)=2, thus dim(ker(B'))=1
        K=null(B'); % the columns of K are a basis of the Kernel
        V=K(:,1); % in fact, in this case, V and K are identical
        a=rand(1,3);
        A=[a(1)*V,a(2)*V,a(3)*V]';% note the transposition operator
        A*B,%test : must be zero






        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Nov 15 at 13:19

























        answered Nov 15 at 13:08









        Jean Marie

        28k41848




        28k41848






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2996601%2fab-0-solving-for-matrices-in-matlab%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How do I know what Microsoft account the skydrive app is syncing to?

            When does type information flow backwards in C++?

            Grease: Live!