1. matrix multiplication,

Hi,

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

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

$
\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.

$
\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.

2. X must be a 2 x 1 matrix. You could let it have elements a and b, and try solving simultaneously.

3. You need to take into account the dimensions of the matrix.

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

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

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

There are two ways to solve this.

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

$\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

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

Solve for $x$ and $y$.

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

If you have an equation

$A\mathbf{x} = B$

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

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

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

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

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

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

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

4. Originally Posted by craigmain
Hi,

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

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

$
\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.

$
\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 \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)

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

only in some cases can be $AB = BA$

as for the your problem there

$\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 $X= \begin{bmatrix}
x_1 \\
x_2
\end{bmatrix}$

so when multiplied you get system of equations like :

$3x_1+9x_2=18$
$5x_1+x_2=10$
$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 .... )