Results 1 to 4 of 4

Thread: matrix multiplication,

  1. #1
    Junior Member
    Joined
    Jan 2009
    Posts
    57

    matrix multiplication,

    Hi,

    I have a matrix that looks like the following.
    $\displaystyle
    A = \left[\begin{matrix} 3 & 9 \\ 5 & 2 \\ 1 & 4 \end{matrix}\right]
    $

    by doing the following, I can add the two columns.

    $\displaystyle
    \left[\begin{matrix} 3 & 9 \\ 5 & 2 \\ 1 & 4 \end{matrix}\right] * \left[\begin{matrix} 1 \\ 1 \end{matrix}\right] = \left[\begin{matrix} 12 \\ 7 \\ 5 \end{matrix}\right]
    $

    My question is:

    Is there any clever way to multiply columns in the matrix.

    $\displaystyle
    \left[\begin{matrix} 3 & 9 \\ 5 & 2 \\ 1 & 4 \end{matrix}\right] * X = \left[\begin{matrix} 18 \\ 10 \\ 4 \end{matrix}\right]
    $

    Can X be a matrix of any kind?

    Regards
    Craig.
    Last edited by craigmain; Sep 7th 2010 at 02:29 AM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Joined
    Oct 2009
    From
    Brisbane
    Posts
    898
    Thanks
    200
    X must be a 2 x 1 matrix. You could let it have elements a and b, and try solving simultaneously.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    12,880
    Thanks
    1946
    You need to take into account the dimensions of the matrix.

    You know that for matrices $\displaystyle A$ and $\displaystyle B$, the number of columns in $\displaystyle A$ has to equal the number of rows in $\displaystyle B$ to be able to multiply them. And if $\displaystyle A$ has dimensions $\displaystyle m \times n$ and $\displaystyle B$ has dimensions $\displaystyle n \times p$, then $\displaystyle AB$ has dimensions $\displaystyle m \times p$.


    So you have a $\displaystyle 3 \times 2$ multiplied by $\displaystyle X$ to give $\displaystyle 3 \times 1$.

    That means $\displaystyle X$ has dimensions $\displaystyle 2 \times 1$.

    There are two ways to solve this.

    The first is to write $\displaystyle X$ as $\displaystyle \left[\begin{matrix}x\\y\end{matrix}\right]$ so that your equation is

    $\displaystyle \left[\begin{matrix}3 & 9\\ 5 & 1\\ 1 & 4\end{matrix}\right] \left[\begin{matrix}x\\y\end{matrix}\right] = \left[\begin{matrix}18\\10\\4\end{matrix}\right]$.

    Perform the multiplication on the LHS to get

    $\displaystyle 3x + 9y = 18$
    $\displaystyle 5x + y = 10$
    $\displaystyle x + 4y = 4$.

    Solve for $\displaystyle x$ and $\displaystyle y$.


    The other way is to create a "pseudo-inverse" matrix.

    If you have an equation

    $\displaystyle A\mathbf{x} = B$

    only square matrices have inverses, so to create a square matrix on the LHS, premultiply both sides by $\displaystyle A^T$.


    $\displaystyle A^TA\mathbf{x} = A^TB$.

    Since $\displaystyle A^TA$ is square, you can multiply both sides by its inverse (as long as it's invertible).


    $\displaystyle A^TA\mathbf{x} = A^TB$

    $\displaystyle (A^TA)^{-1}A^TA\mathbf{x} = (A^TA)^{-1}A^TAB$

    $\displaystyle I\mathbf{x} = (A^TA)^{-1}A^TB$

    $\displaystyle \mathbf{x} = (A^TA)^{-1}A^TB$.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Senior Member yeKciM's Avatar
    Joined
    Jul 2010
    Posts
    456
    Quote Originally Posted by craigmain View Post
    Hi,

    I have a matrix that looks like the following.
    $\displaystyle
    A = \left[\begin{matrix} 3 & 9 \\ 5 & 1 \\ 1 & 4 \end{matrix}\right]
    $

    by doing the following, I can add the two columns.

    $\displaystyle
    \left[\begin{matrix} 3 & 9 \\ 5 & 1 \\ 1 & 4 \end{matrix}\right] * \left[\begin{matrix} 1 \\ 1 \end{matrix}\right] = \left[\begin{matrix} 12 \\ 7 \\ 5 \end{matrix}\right]
    $

    My question is:

    Is there any clever way to multiply columns in the matrix.

    $\displaystyle
    \left[\begin{matrix} 3 & 9 \\ 5 & 1 \\ 1 & 4 \end{matrix}\right] * X = \left[\begin{matrix} 18 \\ 10 \\ 4 \end{matrix}\right]
    $

    Can X be a matrix of any kind?

    Regards
    Craig.
    this can be done

    $\displaystyle \displaystyle \begin{bmatrix}
    a_{11} & a_{12}\\
    a_{21} & a_{22} \\
    a_{31} & a_{32}
    \end{bmatrix} \cdot \begin{bmatrix}
    b_{11} \\
    b_{12}

    \end{bmatrix} $

    meaning that matrix A(m x n) can be multiplied with another matrix B (n x m) only if matrix B have same number of the columns as the matrix A have rows

    important is that (mostly)

    $\displaystyle A\cdot B \ne B\cdot A$

    only in some cases can be $\displaystyle AB = BA $


    as for the your problem there

    $\displaystyle \displaystyle \left[\begin{matrix} 3 & 9 \\ 5 & 1 \\ 1 & 4 \end{matrix}\right] * X = \left[\begin{matrix} 18 \\ 10 \\ 4 \end{matrix}\right] $

    your X can be $\displaystyle X= \begin{bmatrix}
    x_1 \\
    x_2
    \end{bmatrix}$

    so when multiplied you get system of equations like :

    $\displaystyle 3x_1+9x_2=18$
    $\displaystyle 5x_1+x_2=10$
    $\displaystyle x_1+4x_2=4$



    Edit : sorry Prove It I have no idea why i didn't see your post .... early hm... very very sorry (P.S. when i refreshed this thread it wasn't there, and i waited to my post be posted at least 5 min. don't know what just happen .... )
    Last edited by yeKciM; Sep 7th 2010 at 02:45 AM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. [SOLVED] Matrix Notation and Matrix Multiplication
    Posted in the Advanced Algebra Forum
    Replies: 7
    Last Post: Feb 11th 2011, 03:57 AM
  2. Matrix Multiplication
    Posted in the Advanced Algebra Forum
    Replies: 3
    Last Post: Jan 12th 2011, 03:39 AM
  3. Matrix multiplication.
    Posted in the Advanced Algebra Forum
    Replies: 10
    Last Post: Nov 2nd 2010, 07:38 AM
  4. Matrix Multiplication
    Posted in the Algebra Forum
    Replies: 3
    Last Post: Jan 26th 2010, 03:40 AM
  5. Matrix multiplication
    Posted in the Pre-Calculus Forum
    Replies: 2
    Last Post: Nov 7th 2009, 08:50 AM

Search Tags


/mathhelpforum @mathhelpforum