# Thread:

1. ## Question about convex set

So i know the definition of a convex set:
Set S is convex then tx+(1-t)y belongs to S for all 0<t<1

I have to decide whether the following set is convex:
{(x,y); x-y<=1}

I started with tx+(1-t)y = t(x-y)+y <= t+y

then I am stuck.

edit: hm I think I might have been mixing up the the points that I choose (x,y) with the variabels in x-y<=1...

I redid it with matrices and this is what i came up with:

(1 -1)(x1,x2) <= 1 , c = (1 -1)
cx <= 1
cy <= 1

=> c(tx + (1-t)y) = tcx+(1-t)cy <= t + 1 -t = 1

Is this the correct way to solve the problem?

2. ## Re: Question about convex set

Originally Posted by MagisterMan
So i know the definition of a convex set:
Set S is convex then tx+(1-t)y belongs to S for all 0<t<1

I have to decide whether the following set is convex:
{(x,y); x-y<=1}

I started with tx+(1-t)y = t(x-y)+y <= t+y

then I am stuck.

edit: hm I think I might have been mixing up the the points that I choose (x,y) with the variables in x-y<=1... Yes, that is exactly what you were doing!
In this problem, the set $S = \{(x,y): x-y\leqslant1\}$ is a set of points in two-dimensional space. The definition of convexity says that you have to take two points in S. Call them $(x_1,y_1)$ and $(x_2,y_2)$. The fact that these points are in S tells you that $x_1-y_1\leqslant1$ and $x_2-y_2\leqslant1.$

To see whether S is convex, you have to check whether the point

$t(x_1,y_1) + (1-t)(x_2,y_2) = \bigl(tx_1+(1-t)x_2,ty_1+(1-t)y_2\bigr)$

is in S. The condition for that is $\bigl(tx_1+(1-t)x_2\bigr) - \bigl(ty_1+(1-t)y_2\bigr) \leqslant1.$ So you need to check whether that condition follows from what you are given.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 7, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9480598568916321, "perplexity_flag": "middle"}