I have a task for the Digital Signal Processing subject. I have to solve the task in Octave language, but at first I would like to understand how to solve it from the math perspective. I think the task is related to linear algebra, which I don't know. Could someone explain how to solve it? I tried to do it myself, but was stuck when found out that at first the matrix A should be inversed (A --> A^-1), however, idk how to do it for a non square matrix. Maybe I don't know something, and the matrix should not be inversed (just found that info just googling).
The task:
Given the matrix A (3x6):
1 3 5 7 9 11
1 4 9 16 25 36
4 8 16 32 64 128Find matrix B, C and D.
- A * B = sum of A matrix column #2 and #5 (3+4+8 + 9+25+64 = 113)
- C * A = the second row of the matrix A = 1 4 9 16 25 36
- D * A = matrix A where the first and the second rows are swapped
1 Answer
$\begingroup$First of all, as you've found already, it is impossible to find the inverse of a matrix unless it has the same number of rows and columns. In any case, there is no need to do this here.
Note also that you have misinterpreted the first question: the sum of column 2 and column 5 of $A$ is given by$$ \pmatrix{3\\4\\8} + \pmatrix{9\\25\\64} = \pmatrix{12\\29\\72}. $$
The first question is looking for a specific column vector $B$. Note that if $C_1,\dots,C_n$ are the columns of $A$ and $b_1,\dots,b_n$ are the entries of $B$, then$$ \pmatrix{C_1 & C_2 & \cdots & C_n} \pmatrix{b_1 \\ b_2 \\ \vdots \\ b_n} = b_1 C_1 + b_2 C_2 + \cdots + b_n C_n. $$For which values of $b_1,\dots,b_6$ do we get the sum of $C_2$ and $C_5$? Try to make it so that each of $b_1,\dots,b_6$ is either $0$ or $1$.
The second question is looking for a specific row vector $C$. Note that if $R_1,\dots,R_n$ are the rows of $A$ and $c_1,\dots,c_n$ are the entries of $C$, then$$ \pmatrix{c_1 & c_2 & \cdots & c_n} \pmatrix{R_1\\R_2 \\ \vdots \\ R_n} = c_1 R_1 + c_2 R_2 + \cdots + c_nR_n. $$For which values of $c_1,c_2,c_3$ do we get $R_2$, the second row of the matrix $A$?
The third question is looking for a square $3 \times 3$ matrix $D$. Note that if $R_1,R_2,R_3$ are the rows of $D$, then$$ \pmatrix{R_1\\R_2\\R_3}A = \pmatrix{R_1 A\\ R_2A \\ R_3 A}. $$Look for rows $R_1,R_2,R_3$ such that $R_1A$ is the second row of $A$, $R_2 A$ is the first row, and $R_3A$ is the third row.
$\endgroup$ 1