C26 Verify that the function below is a linear transformation.

\[ T: P_2 \rightarrow \mathbb{C}, \quad T(a+bx+cx^2) = \left[ \frac{2a-b}{b+c} \right] \]

To verify if a function is a linear transformation, it needs to satisfy two properties:

  1. Additivity: \[ T(u + v) = T(u) + T(v) \] for all vectors \(u\) and \(v\) in the domain of \(T\).

  2. Homogeneity: \[ T(cu) = cT(u) \] for all vectors \(u\) and scalar \(c\) in the domain of \(T\).

Let’s apply these properties to the given function:

  1. Additivity: \[ T(u + v) = T((a_1 + b_1x + c_1x^2) + (a_2 + b_2x + c_2x^2)) \] \[ = T((a_1 + a_2) + (b_1 + b_2)x + (c_1 + c_2)x^2) \]

    Applying \(T\) to each term: \[ = [2(a_1 + a_2) - (b_1 + b_2), (b_1 + b_2) + (c_1 + c_2)] \]

    On the other hand: \[ T(u) + T(v) = [2a_1 - b_1, b_1 + c_1] + [2a_2 - b_2, b_2 + c_2] \] \[ = [2(a_1 + a_2) - (b_1 + b_2), (b_1 + b_2) + (c_1 + c_2)] \]

    Since \(T(u + v) = T(u) + T(v)\), the additivity property holds.

  2. Homogeneity: \[ T(cu) = T(c(a + bx + cx^2)) \] \[ = T(ca + cbx + ccx^2) \]

    Applying \(T\) to each term: \[ = [2ca - cb, cb + cc] \]

    On the other hand: \[ cT(u) = c[2a - b, b + c] \] \[ = [2ca - cb, cb + cc] \]

    Since \(T(cu) = cT(u)\), the homogeneity property holds.

Therefore, the given function \(T\) is a linear transformation.

We can also check to see whether the function satisfies these properties using R:

# Define the function T
T <- function(u) {
  c(2 * u[1] - u[2], u[2] + u[3])
}

# Check additivity property
u <- c(1, 2, 3)
v <- c(4, 5, 6)

if(all(T(u + v) == T(u) + T(v))) {
  print("Additivity property holds.")
} else {
  print("Additivity property does not hold.")
}
## [1] "Additivity property holds."
# Check homogeneity property
c_scalar <- 3

if(all(T(c_scalar * u) == c_scalar * T(u))) {
  print("Homogeneity property holds.")
} else {
  print("Homogeneity property does not hold.")
}
## [1] "Homogeneity property holds."