## What is a polynomial?

A polynomial is a mathematical expression that contains more than two algebraic terms. It is a sum of several terms that contain different powers of the same variable. $p\left(x\right)$ is the representation of a polynomial. A polynomial expression representation consists of at least one variable, and typically includes constants and positive constants as well. It is represented as , where $x$ is the variable,  are the coefficients and $\text{n}$ is the degree of the polynomial.  The coefficients must be a real number.

It is necessary for the polynomial expression that each expression consists of two parts:

1. Coefficient part
2. Exponent part

Example:

. Here, 21, 3, 14, and 21 are the coefficients, and 3,2,1 and 0 are the exponential values$x$.

## Types of polynomials

### Monomial

It has only one term, like 2x, 23xy.

### Binomial

It has two terms, or we can say that it is the sum of two monomials; for example, 2x+3.

### Trinomial

It consists of three terms of monomials; for example, 2x+3y+7z.

## Matrix representation of a polynomial

Consider a polynomial equation . It can be written as:

.

It can be written as . Here, , and .

But how do we find the value of $M$. Furthermore, Here $p\left(x,y\right)$ has degree 2. It is represented as the multiplication of matrix and vector,

Important Point- If  , then

Then compare the coefficients of ${v}_{i}{v}_{j}\forall i,j$ both sides of the equation to get ${m}_{ij}$.

,

then .

Let us assume that .

From the first line, we note that:

, and hence that

It is a matrix representation of the polynomial.

## Vector space of polynomials

The n degree polynomial is a function that is represented as:

, where  is the coefficient of a real number, and n is degree.

Polynomials are represented by the vector of their coefficients in a vector space:

## Representation of polynomial

There are various ways to represent the polynomials, two of which are given below.

• Using array

### Representation of polynomial equation using array

The operations such as addition, subtraction, multiplication, differentiation and so forth can be performed on the polynomials represented as arrays.

Example:

Consider a polynomial with two variables: $2{x}^{2}+5xy+{y}^{2}$.

The array representation of the polynomial is give below:

 2 2 0 5 1 1 1 0 2

Index 0 stores the coefficient of the first term, index 1 stores the exponent of the variable x and index 2 stores the exponent of the variable y in the first term. The process is repeated for the remaining terms in the polynomial.

It can also be represented as a 2-dimentional array as follows:

 ${y}^{0}$ ${y}^{1}$ ${y}^{2}$ ${x}^{0}$ 0 0 1 ${x}^{1}$ 0 5 0 ${x}^{2}$ 2 0 0

Representation of polynomial with single variable -

Consider a polynomial $-4+7x+6{x}^{2}$ then we can write as:  $-4{x}^{0}+7{x}^{1}+6{x}^{2}$

For the one-dimensional array, store the coefficients in the index given by the coefficient of the polynomial.

In the array representation, the array first the first element stores the coefficient of the term with the lowest exponent and the last element contains the coefficient of the term with the highest exponent.

The above diagram shows the array representation of polynomial. A polynomial of a single variable $A\left(X\right)$ can be written as ${a}_{0}+{a}_{1}{X}^{1}+{a}_{2}{X}^{2}+{a}_{3}{X}^{3}+.........+{a}_{n}{X}^{n}$ where ${a}_{n}\ne 0$ and degree of $A\left(X\right)$ is n. Here  is the coefficient of respective terms.

The polynomial is represented using an array of size n which has n+1 terms.

Consider two different polynomials  and . The degree of ${X}_{1}$ is 3 and the degree of ${X}_{2}$ is 2. The steps to add the polynomials are listed below.

• First identify the highest degree polynomial. The degree of the resultant polynomial is same as the polynomial with the highest degree.
• Store the coefficient in the index specified by the exponents of the polynomial.
• Add the coefficients stored in one array with the corresponding index positions in the other array and store the result in the same index position in the resultant array.

## Representation of polynomial using linked list

An ordered list of non-zero terms can be thought of as a polynomial. Each non-zero term consists of three sections namely coefficient part, exponent part, and then a pointer pointing to the node containing the next term of the polynomial.

Let's take an example-

If the polynomial is $2{x}^{2}+3x+4$, then it is written in the form of $2{x}^{2}+3{x}^{1}+4{x}^{0}$ and represented it using a linked list.  In the diagram, AON means "address of next node".

The above diagram shows the linked list representation of polynomial. A polynomial of a single variable can be written as ${a}_{0}+{a}_{1}{X}^{1}+{a}_{2}{X}^{2}+{a}_{3}{X}^{3}+.........+{a}_{n}{X}^{n}$ where ${a}_{n}\ne 0$  and degree of $A\left(X\right)$ is n. Here is the coefficient of respective terms.

Consider the polynomials $12{x}^{4}+2{x}^{2}+10$ and $9{x}^{3}+8{x}^{2}+x$.

Case 1:

If the exponent of the node pointed by j of ${X}_{2}$ is less than the exponent of the current node pointed by i of ${X}_{1}$, then copy the value of current node of ${X}_{1}$ pointed by i in the new node. If the new node is the first node, make it pointed by ${X}_{3}$ and a pointer k. Otherwise, add the new node next to the last node.

Case 2:

If the exponent of the node pointed by j of ${X}_{2}$ is greater than the exponent of the current node pointed by i of ${X}_{1}$, then copy the value of the current node ${X}_{2}$ pointed by j in the new node. If the new node is the first node, make it pointed by ${X}_{3}$ and a pointer k. Otherwise, add the new node next to the last node.

Case 3:

If the exponent of two terms of polynomials  is equal, then the coefficients are added, and the new term is stored in the resultant polynomial ${X}_{3}$ and advance i, j and k to move to the next node.

## Common Mistakes

There are some common mistakes made in the polynomial. When expanding a binomial raised to a power, students frequently make the error of "distributing the exponent," which is comparable to distributing a coefficient. Here's an illustration:

This is a wrong calculation. Remember that squaring a polynomial is the same as multiplying it by itself. If we perform the same thing with this binomial, we get the following:

The outcomes are not the same. Remember that the word "distribute" refers to multiplication, not exponents or powers. Note that we could have multiplied the two polynomials with FOIL as well. When factoring a sum or difference of squares, the same mistake is committed in reverse:

===> Incorrect

or  ===> Incorrect

There is no factoring formula that uses the "sum of squares." There is, however, a factoring formula based on "difference of squares"; though, the output is not the same binomial squared:

==> correct

When asked to simplify an expression within a radical, another common error is to spread the root. As an example,

Incorrect!!!

Since we cannot factor ${x}^{2}+9$

We didn't write it as a square or some other equation, so the square root can't be calculated.

## Context and Applications

This topic is very useful for under graduation and post graduation also. Especially for,

• Bachelor degree in Computer Science
• Bachelor degree in Electronics engineering
• Master in Computer science
• Polynomial representation in data structure
• Polynomial in one variable
• Coefficient of polynomial

## PracticeProblems

Q1- The Exponent of polynomial must be-

1. Negative
2. Non Negative
3. None
4. Complex number

Explanation- For an algebraic expression to be a polynomial, all of the exponents in it must be non-negative integers. If an algebraic expression contains a radical, it isn't a polynomial, as a general rule.

Q2- is a polynomial of-

1. One variable
2. Two variable
3. Three variable
4. Four variable

Explanation-  The expression contains only one variable x.

Q3- What is the way to represent a polynomial?

1. Representation using Array
3. Both
4. None

Explanation- There are 2 ways to represent a polynomial and they are array and linked list.

Q4- What is the example of trinomial?

1.
2.
3.
4. None

Explanation- This expression contains 3 variables x, y and z.

1. exponents of the corresponding terms
2. coefficients of the corresponding terms
3. both
4. none

Correct answer- 2. coefficients of the corresponding terms

Explanation- The coefficient of the first polynomial is added with the coefficient of the corresponding term in the second polynomial to obtain the resultant polynomial.

### Want more help with your computer science homework?

We've got you covered with step-by-step solutions to millions of textbook problems, subject matter experts on standby 24/7 when you're stumped, and more.
Check out a sample computer science Q&A solution here!

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.

### Search. Solve. Succeed!

Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.

Tagged in
EngineeringComputer Science

### Representation of Polynomial

• Copyright, Community Guidelines, DSA & other Legal Resources: Learneo Legal Center
• bartleby, a Learneo, Inc. business