# In 1D DCT, why is the input a vector?

The question is specific to this document: Image Compression.

It is chapter 6 from book "A First Course in Applied Mathematics" by Jorge Rebaza. It is, a to the point explaination of DCT that is easier for an engineer to grasp. However, some things are not explained and thus here I am.

The questions are about the notation used when the book starts talking about 1D DCT; on pg.3 of the pdf it shows $x$ that is the input to be transformed. This $x$ is a vector i.e a matrix with $n$ rows and $1$ column. We then multiply this with $C$ that is $n \times n$ matrix to get a $n \times 1$ matrix $y$, that contains the DCT coefficients.

Q: Why is $x$ described fundamentally as a column matrix and not a row matrix on pg.3 of pdf? If the $x$ was row matrix i.e it was not transposed, making it $1 x n$ matrix, how would the equation to calculate $y$ change? Right now it is $y=Cx$.

Q: Why is the equation y=Cx and not written as $y'=Cx'$ where the $'$ symbol means transpose? Since we are describing both $x$ and $y$ as being transposes?

Q: When we move to 2D DCT (pg.8 in pdf) the equation is derived like this $y=C \cdot (Cx')'$ which gives $y=CxC'$. How come here we explicitly write the transpose of the operand $x$ but not in the 1D equation?

The descriptions are looking inconsistent.

I do find this chapter quite well-written. The row or the column visions of a vector are mostly matters of convention and convenience. One or the other is perfectly fine. In signal processing, when using algebra, the column version (a vertical vector) is used quite often. If you multiply a col-vector $x$ by matrix $A$, you get a col-vector $y$:

$$y = Ax$$

You can get the row-vector version by transposing:

$$y' = x'A'$$

If you decide to work with row-vectors, you could as well work with $v=uB$, but the matrix on the left seems more easy to read (at least with western languages).

When you deal with an image or image block $X$, you can apply a transform on both the columns, at $Y_1=AX$. $Y_1$ is a matrix whose columns are the transformation of each column of $X$. Then, you can work on the rows of $Y_1$, by applying the formula $Y_1 A'$: every row is now affect.ed by the transform. The final result is thus $(AX)A'$, or $A((AX')') = A(XA')$

• To work on the rows, we move A to the right and also transpose it, how come? – quantum231 Apr 12 '17 at 12:55
• Why is 1d dct written as y=Cx and no transpose sign is used even once, but two transpose signs used in 2d? – quantum231 Apr 12 '17 at 13:10
• What is your familiarity with basic algebraic rules? have a look at the diagrams here mathsisfun.com/algebra/matrix-multiplying.html or try to perform a multiplication of a $2\times 2$ matrix with vector $[a,b]$ to the left, and $[a,b]'$ to the right – Laurent Duval Apr 12 '17 at 13:44