Learn R Programming

conics (version 0.3)

conicMatrix: Matrix representing a conic

Description

Build a symmetric matrix representing a quadratic polynomial in two variables.

Usage

conicMatrix(v)

Arguments

v
(vector) a 6-length vector containing the coefficients of a quadratic polynomial.

Value

Return the symmetric 3x3 matrix representing the associated quadratic form.

Details

The v argument is a 6-length vector containing the coefficients of a quadratic polynomial of the form:
    P(x_1,x_2) = v_1 x_1^2 + v_2 x_1 x_2 + v_3 x_2^2 + v_4 x_1 + v_5 x_2 + v_6 
The associated quadratic form is:
    Q(x_1,x_2,x_3) = v_1 x_1^2 + v_2 x_1 x_2 + v_3 x_2^2 + v_4 x_1 x_3 + v_5 x_2 x_3 + v_6 x_3^2 

See Also

conicAsymptotes, conicAxes, conicCenter, conicPlot

Examples

Run this code
# Equation: 2*x_1^2 + 2*x_1*x_2 + 2*x_2^2 - 20*x_1 - 28*x_2 + 10 = 0
v <- c(2,2,2,-20,-28,10)
conicMatrix(v)

Run the code above in your browser using DataLab