# Week 4 ## 1. The null space vector provided is a solution to the system Dx=0, where D is the full matrix of vehicles, including the value_score column, and the i-th value in x corresponds to the i-th column of D. #### TRUE The null space of a matrix $D$ is defined as: $$ \mathcal{N}(D) = \{ x \mid Dx = 0 \} $$ In the application notebook, the matrix $D$ represents the full vehicle dataset, where each column corresponds to a vehicle feature (including the value_score column). A vector x in the null space assigns one coefficient to each column of $D$. Multiplying D by such a vector forms a linear combination of its columns. The notebook confirms that this linear combination produces the zero vector. Therefore, the provided null space vector satisfies $Dx = 0.$ ## 2.The matrix D has a rank less than its number of columns. Therefore, if we pick a vector b with a compatible number of rows, the system of equations Dx=b has no solution. #### FALSE If the rank of a matrix $D$ is less than its number of columns, then the columns of $D$ are linearly dependent. However, this does not imply that the system $$ Dx = b $$ has no solution for every compatible vector $b$. A solution exists if and only if $b$ lies in the column space of $D$. For example: $$ D = \begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}, \quad b = \begin{bmatrix} 3 \\ 6 \end{bmatrix} $$ Even though $D$ has rank $1$, the vector $b$ lies in its column space, so solutions exist. ## 3. Given A as described in the notebook, it is possible that the column weight is a perfect linear combination of the rest of the columns in A. I.e., we can find a, b, and c such that the following is true: a⋅acc+b⋅model_year+c⋅cyl=weight. #### FALSE The statement claims that the weight column can be written as a perfect linear combination of other columns: #### a⋅acc+b⋅model_year+c⋅cyl=weight. For this equation to hold, it must be true for every row in the dataset. The notebook data represents real-world vehicle measurements, which include variation and noise. Since weight is not a redundant column, it cannot be expressed as an exact linear combination of the other features. ## 4. A' is invertible. Therefore, there is only one way to add multiples of the columns of A' to "create" b'. That is, there is only one linear combination of the columns of A' that yields b' #### TRUE The notebook constructs the matrix $A'$ with linearly independent columns. Under this condition, the matrix $$ A'^T A' $$ is invertible. Invertibility implies that the system $$ A'^T A' x = b' $$ has a unique solution. Therefore, there is exactly one linear combination of the columns of $A'^T A'$ that produces $b'$. ## 5. Consider the document d we created. Document d is in the row space of the matrix C #### TRUE Matrix $C$ is a document–term matrix, where each row corresponds to a document and each column corresponds to a term. The row space of $C$ consists of all linear combinations of these document vectors. Document $d$ is constructed using the same vocabulary and feature structure as the rows of $C$. Hence, it lies in the row space of $C$. ## 6. The heatmap visualization of cosine distances allows us to observe the angle between document vectors. #### FALSE Cosine similarity between vectors $u$ and $v$ is defined as: $$ \cos(\theta) = \frac{u \cdot v}{\|u\|\|v\|} $$ The notebook visualizes cosine distance, defined as: $$ \text{cosine distance} = 1 - \cos(\theta) $$ The heatmap displays distance values, not angles, so the angle between document vectors cannot be directly observed. ## 7. By looking at the cosine distance matrix (at the bottom of the notebook), we see evidence of documents that do not share any terms in common. #### TRUE If two documents share no terms in common, their dot product is zero: $$ u \cdot v = 0 $$ This results in: $$ \cos(\theta) = 0 \quad \Rightarrow \quad \text{cosine distance} = 1 $$ The cosine distance matrix in the notebook contains values close to $1$, indicating document pairs with no shared terms. ## 8. In the cosine distance matrix, if there were 0 values on the off-diagonal, that would indicate two documents that must be identical, i.e., exactly the same. #### FALSE A cosine distance of $0$ implies: $$ \cos(\theta) = 1 $$ This means the vectors point in the same direction, but are not necessarily identical. For example: $$ d_1 = (1, 2, 3), \quad d_2 = (2, 4, 6) $$ These vectors are scalar multiples of each other but are not exactly the same document.